Qwen Mask Processor
Blur, expand and feather a mask before you inpaint with it
- image
- mask_override
- image
- mask
- preview
- mask_preview
A raw mask - the kind you get from a rough paint pass or a detector - is usually too crisp and too tight to inpaint with cleanly. QwenMaskProcessor is the cleanup pass: it blurs the edge, grows or shrinks the region, and feathers it so the edited area blends back into the original instead of leaving a hard rectangle you can spot from across the room. If you're doing masked editing with Qwen-Image, this is the node that stands between "I drew a mask" and "the edit actually looks seamless."
Why bother? Because the standard 2026 Qwen editing workflow leans on masks specifically to fix the model's biggest weakness. Qwen-Image-Edit re-emits the whole frame - it returns a new image, not a patched one - so unedited regions drift and faces wander over a chain of edits. The community answer is to mask the region and only let the model touch the crop. But a mask does its job only if its edges are treated: too tight and you get a visible seam, too hard and the transition is obvious.
How it works
Feed it the image you're editing and a mask (either as mask_data or, more usefully, via the mask_override input), and it applies three transforms in sequence: blur softens the edge, expand grows or contracts the covered area by a pixel amount, and feather ramps the alpha so the boundary fades rather than cuts. Out come the processed mask plus preview images so you can see what you're about to inpaint with.
The inputs and outputs that matter
image- the picture the mask belongs to. Used for the previews and to keep everything the same size.mask_override(optional MASK) - the practical way to bring a mask in from another node. In most graphs you'll wire your mask here rather than fiddling with themask_datastring.mask_blur(default 2) - edge softness. Small values are plenty; crank it only if you're seeing a hard line.mask_expand(−50 to 50) - grow the mask to catch a halo around your subject, or shrink it to protect the edges. Positive grows, negative shrinks.mask_feather(default on) - the alpha ramp that does most of the seamless-blend work.
Four outputs: image, mask (the processed one you actually use), preview, and mask_preview. This is an output node, so it'll show you the result inline. Wire mask into your inpaint conditioning.
How to install it
ComfyUI Manager → ComfyUI-QwenImageWanBridge → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/fblissjr/ComfyUI-QwenImageWanBridge
then restart. It's mask math, so no model download for the node itself - the Qwen-Image-Edit weights you're editing with are the heavy part of that graph.
Common issues & troubleshooting
Visible seam around the edit. Increase mask_blur and make sure mask_feather is on. A hard-edged mask is the number-one cause of "you can tell it was inpainted."
The edit clips the subject. Your mask is too tight - nudge mask_expand positive to give the model a few pixels of breathing room around the region.
The whole frame still drifts. That's not this node's fault; it's Qwen-Image-Edit re-emitting the frame. A processed mask helps the composite blend, but for true pixel-preservation you want a crop-and-stitch pattern so the model only ever sees the masked region. This node is one piece of that, not the whole answer. Note too that it lives in the pack's experimental tier, so treat it as a convenience helper next to the ecosystem's more established mask nodes rather than a canonical one.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Source image for editing | |
| mask_data | STRING | — | |
| mask_blur | FLOAT | 2.00–20 | Gaussian blur for mask edges |
| mask_expand | INT | 0-50–50 | Expand (+) or contract (-) mask pixels |
| mask_feather | BOOLEAN | true | Apply edge feathering for smoother blending |
| mask_overrideopt | MASK | Override generated mask |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| preview | IMAGE | — |
| mask_preview | IMAGE | — |