QWEN-Inpaint: mask one region, edit only that, and where to run it

September 4, 2026
Models

The weights are Apache 2.0 and free to download, the easy end of the licensing spectrum. Running it yourself means the development branch of the Hugging Face diffusers library, bfloat16, and a CUDA GPU, though at 2 billion parameters that is a far smaller ask than most editors. ComfyUI supports it natively from version 0.3.59. In your browser it runs on CNAPS Studio, included in the basic plan.

What you get is a guarantee rather than a suggestion. Paint a mask over the region you want changed, describe what should be there, and every pixel outside the mask stays byte-for-byte identical to the original. Ask a general editing model to change a shirt and it will often repaint the face and the wall a little too. Here the boundary is enforced, not hoped for.

The cost is that you have to know where the edit goes, and you have to describe scenes rather than issue orders, because this was trained as a mask-following add-on rather than an instruction follower. It is also the smallest of the three QWEN editors in the CNAPS Studio catalog, and the least publicly tested.

What it actually is

It is a control add-on layered onto Alibaba's Qwen-Image generator, built by the InstantX team for filling masked regions and extending borders. That matters for the license: the add-on weights are Apache 2.0, while the underlying generator is licensed separately by Alibaba, so self-hosting means agreeing to two documents rather than one.

It was trained from scratch for 65,000 steps on 10 million general and human images at 1328 by 1328 pixels, a purpose-built run rather than a light adjustment of something existing. Four advertised jobs: object replacement, text rewriting inside an image, background replacement, and outpainting.

Three settings decide the result. CFG scale, from 1 to 10 and defaulting to 4, controls how literally the prompt is followed and is the main lever. Crop padding zooms into the masked area, fills it at higher resolution, and blends it back, useful when the region is small relative to the picture. The checkbox keeping everything outside the mask identical is on by default; turning it off lets the model touch surrounding pixels for a softer blend.

How to prompt it

Describe the whole finished image, not just the patch, and describe rather than command. For a masked shoe the prompt that works is a red sneaker on a wooden floor with soft window light, and a green taxi driving on the road rather than replace the car with a green taxi.

Negative prompts barely do anything here; the vendor's own examples pass an empty placeholder. If a result is wrong, the fix is a longer positive prompt or a different CFG scale. For text inside an image, spell the exact words in quotation marks; typography follows the surrounding context, since there is no font control.

What is actually published, and what is not

There is no benchmark table: no accuracy score, no evaluation suite, no comparison figures. What is published: the training recipe above, the 2 billion parameter count, the Apache 2.0 license, recommended settings of 30 steps at a guidance scale of 4.0, and 4,562 downloads last month.

Every quality claim therefore comes from the team that trained it, unquantified. The one argument in its favour needs no benchmark: the pixel guarantee is arithmetic, not a model behaviour, since unmasked pixels are copied straight from the input after generation. That is the reason to pick this over an editor that merely tries to stay in its lane.

How it compares to the other editors here

None of the three QWEN editors publishes benchmark scores, so there are no numbers to line up and inventing a ranking would be dishonest. What separates them is how you point at the edit.

Reach for QWEN-Inpaint when you can define the region and need everything else untouched, for QWEN-2511 when the change is easier to describe than to outline, and for QWEN-Layered when you would rather take the image apart and edit one element in isolation. When the job is simply making something disappear, the catalog's purpose-built removal models, PowerPaint, Moebius (Object Removal) and LatentDiffusion (Object Removal), are the shorter route.

What to chain it with

Input is an image, a mask the same size marking what to change in white, and a text prompt. Output is the same image at the same size with only the masked area different. The mask is the interesting input, since you rarely want to paint one by hand.

Two chains solve that. SAM 3.1 (Scene) turns a text phrase into a mask, so you can type what to replace and hand the merged mask straight here, making the pair a describe-and-replace tool. Otherwise Manual Image Masker lets you draw the region when the target is easier to point at than to name.

Open QWEN-Inpaint in CNAPS Studio, mask one object, and run that mask twice: once with a bare prompt naming the object, once with a sentence describing the whole scene. The gap between those two results is the thing worth learning here.

Sources

  • huggingface.co/InstantX/Qwen-Image-ControlNet-Inpainting for the Apache 2.0 license, the 2 billion parameter count, the full training recipe, the four advertised use cases, the recommended inference settings, the prompting guidance, the ComfyUI version requirement, and the monthly download count.
  • docs.cnaps.ai/ai-model-hub for the CNAPS Studio inputs, the CFG scale range, the crop padding option, and the option that keeps unmasked pixels identical.

Related Posts

One email, every other Thursday.

New research notes, customer workflows, and model integrations straight from the team.

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form