ComfyUI Node

Eric Qwen-Edit Inpaint

The experimental inpaint workaround

By EricRollei·Created 6 months ago·Updated 4 months ago· 20
Eric Qwen-Edit Inpaint
  • pipeline
  • image
  • mask
  • image
prompta beautiful garden with flowers
negative_prompt
mask_modeblank_white
feather8
steps8
true_cfg_scale4.0
seed0
max_mp8.0

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), or color_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 consider blank_gray or color_overlay so 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).
CategoryEric Qwen-Edit

Inputs (11)

NameTypeDefaultDescription
pipelineQWEN_EDIT_PIPELINE
imageIMAGEImage to inpaint
maskMASKMask indicating areas to inpaint (white = inpaint, black = keep)
promptSTRINGa beautiful garden with flowersDescribe 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_promptoptSTRINGWhat to avoid
mask_modeoptCOMBOblank_whiteHow 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).
featheroptINT80–50Gaussian blur radius for mask-edge feathering during post-compositing. Higher = softer blend between generated and original pixels at mask edges. 0 = hard edge.
stepsoptINT81–100Inference steps (8 for lightning LoRA, 50 for base model)
true_cfg_scaleoptFLOAT4.01–20True CFG scale
seedoptINT00–18446744073709550000Random seed
max_mpoptFLOAT8.00.5–16Max output megapixels. Lower = faster.

Outputs (1)

NameTypeDescription
imageIMAGE