Eric Qwen-Edit Inpaint
The experimental inpaint workaround
- pipeline
- image
- mask
- image
Here's the thing nobody tells you about Qwen-Edit: it has no native mask input. It regenerates the whole image from your instruction, which means regions you didn't ask about drift - details degrade across a chain of edits. This node is the workaround: it blanks out the masked region, lets the model regenerate just that hole, then composites the result back onto the original.
The README is honest about the status - experimental. It works, and it produces better results than the pack's ControlNet inpainting path, but it still relies on Qwen-Edit reprocessing the full image internally. If you need bit-identical unmasked pixels, traditional mask-based inpainting is still the tool; this is the "Qwen convenience without the drift" middle ground.
The strategy
Blank masked region → model sees a hole and your prompt → post-composite with a Gaussian-feathered mask. Because Qwen-Edit takes the image through both its VL and VAE encoders, the node can't just mask in latent space - it pre-blanks the masked area in pixel space, and the feathered composite at the end is what hides the seam.
Inputs that matter
pipeline- from a loader.image- what you're fixing.mask- white = inpaint, black = keep. Standard ComfyUI mask from any mask-drawing or segmentation node.prompt- describe what to generate in the blank area. The tooltip is blunt: the model sees a hole, so "a beautiful garden with flowers" fills it with a garden. Don't mention the mask.mask_mode- how the hole appears to the model:blank_white(solid white, best for most cases),blank_gray(neutral gray), orcolor_overlay(semi-transparent pink - model sees the original underneath, useful for subtle retexture).feather- Gaussian blur radius (0–50, default 8) for the post-composite edge. Higher = softer blend. 0 = hard cut.steps,true_cfg_scale,seed,max_mp- the usual edit knobs. 8 steps with a Lightning LoRA, 50 with base.
Output: one image.
When to use it (and when not to)
The KB's read on inpainting in 2026 is that instruction editors took over most of the old inpaint jobs - remove this, swap that, restyle - but the mask still uniquely owns (1) bit-identical unmasked pixels and (2) only-masked detail at full resolution. This node gives you a slice of both: mask-control over where Qwen edits, without giving up Qwen's sentence-level convenience. For precise local geometry changes - a face fix, a hand fix - this beats telling Qwen-Edit to "just fix the hand", because it won't touch the rest.
Installing it
ComfyUI Manager → "Eric Qwen-Edit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git
Restart, download Qwen/Qwen-Image-Edit-2511 (~54 GB), load via the pack's loader. Same dependency note as the rest of the pack: diffusers>=0.34,<0.38 and transformers>=4.50,<5 (transformers 5.x breaks older diffusers imports).
Troubleshooting
- Seams visible at mask edges - raise
feather(8→12–16), and considerblank_grayorcolor_overlayso the model has neutral context to blend against. - Area outside the mask still changed - that's Qwen-Edit reprocessing the full image; it's the known limitation this node exists to minimize, not eliminate. Keep masks large enough that edge drift stays inside the feather zone.
- Model fills the hole with junk - your prompt describes the scene the model needs to generate. Give it the content, not the instruction ("remove the table" is a bad inpaint prompt; "grass and gravel path" is a good one).
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | QWEN_EDIT_PIPELINE | — | |
| image | IMAGE | Image to inpaint | |
| mask | MASK | Mask indicating areas to inpaint (white = inpaint, black = keep) | |
| prompt | STRING | a beautiful garden with flowers | Describe WHAT to generate in the blank area. The model sees a blank hole — it will fill it with whatever you describe. Don't mention 'mask'. |
| negative_promptopt | STRING | What to avoid | |
| mask_modeopt | COMBO | blank_white | How the masked region appears to the model. blank_white: solid white hole (best for most cases). blank_gray: neutral gray hole. color_overlay: semi-transparent pink (model sees original underneath). |
| featheropt | INT | 80–50 | Gaussian blur radius for mask-edge feathering during post-compositing. Higher = softer blend between generated and original pixels at mask edges. 0 = hard edge. |
| stepsopt | INT | 81–100 | Inference steps (8 for lightning LoRA, 50 for base model) |
| true_cfg_scaleopt | FLOAT | 4.01–20 | True CFG scale |
| seedopt | INT | 00–18446744073709550000 | Random seed |
| max_mpopt | FLOAT | 8.00.5–16 | Max output megapixels. Lower = faster. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |