Eric Qwen-Edit Apply Mask
The boring mask-compositing node that the flashy Qwen nodes lean on
- foreground
- background
- mask
- image
Not every node in a pack needs to be clever. Eric Qwen-Edit Apply Mask is a plain mask-based compositor: foreground image where the mask is white, background where it's black, blended output. If you've used any ComfyUI masking node, you know exactly what this does - and it's in this pack because the fancier nodes need it.
You'll reach for it in two places. First, after Eric Qwen-Edit Delta: Delta gives you a change_mask, and Apply Mask is the natural way to force a manual blend - feed it the original as background, the edit as foreground, and Delta's mask (or your own input_mask) as the blend mask. Second, as a standalone utility whenever you want a feathered merge of two images without dragging a full compositing suite into the graph.
The inputs
foreground- shown in the white areas of the mask.background- shown in the black areas.mask- the blend mask. This is the whole job: white = foreground, black = background.blur_mask- optional (0–50, default 0). Extra Gaussian blur on the mask for a softer blend. A few pixels here is the difference between a hard cut and a gentle merge when your source mask has jagged edges.
Output: a single image.
Practical notes
- The mask doesn't have to match the images' resolution - ComfyUI resizes it to the image size in the blend, but if your mask is low-res the edges will be blocky. Blur it with
blur_maskto compensate. - This is a full-replacement blend, not an alpha mix. There's no "opacity" dial -
blur_masksoftens the edge, but the white regions are fully foreground and black regions fully background. For partial transparency you'd want to chain a Strength/Multiply node on the mask first. - It pairs beautifully with Delta. That's the pack's own intended composition: keep the original's untouched pixels, drop the AI edit in where the change mask says.
Installing it
ComfyUI Manager → "Eric Qwen-Edit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git
Restart. It needs no model at all - pure tensor image math - so it works in a completely unloaded graph. That's part of why it's handy: you can use it as a generic utility even if you never load Qwen-Edit.
Troubleshooting
- Black or white box instead of a blend - your mask is probably all one value, or wired backwards (black = foreground swaps the blend). Check the mask's values and the socket order.
- Visible seam down the middle - the mask is hard-edged; raise
blur_mask(or blur the mask upstream) to feather the boundary. - Foreground/background reversed - invert the mask, or swap the two image inputs; whichever is easiest to see in your graph.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| foreground | IMAGE | Image to show in white areas of mask | |
| background | IMAGE | Image to show in black areas of mask | |
| mask | MASK | Blend mask: white=foreground, black=background | |
| blur_maskopt | INT | 00–50 | Additional blur applied to mask for softer blending |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |