Nodes/ComfyUI-QwenImageWanBridge/EliGen Mask Painter
ComfyUI Node

EliGen Mask Painter

Quick rectangle and ellipse masks for EliGen regions

By fblissjr·Created 12 months ago·Updated 4 months ago· 188
EliGen Mask Painter
  • input_mask
  • mask
width1024
height1024
shaperectangle
x256
y256
size_x256
size_y256
feather0

This is the little helper that makes the masks you feed into QwenEliGenEntityControl. You give it a canvas size and a box - position and dimensions - and it spits out a MASK with a rectangle or ellipse in it. That's it. It exists so you don't have to hop out to an image editor every time you want to say "put this entity roughly here."

If regional prompting is the game - different prompts for different areas of the canvas - you need one mask per region, and something has to produce them. The heavyweight way is a paint interface like Krita's plugin or Invoke's layered canvas, which are genuinely easier to steer than typing coordinates. This node is the lightweight opposite: numeric, blunt, and fast, for when a plain box is all the precision you need.

How it works

You set width and height to match your generation canvas, pick a shape, and place it with x/y (the corner) and size_x/size_y (how big). The node draws that shape as white-on-black and hands you the MASK. feather softens the edge so the region doesn't cut off with a hard line. Optionally pass an input_mask to build on top of an existing one rather than starting from a blank canvas.

The inputs and outputs that matter

  • width / height - the mask canvas. Match these to the image you're generating or the mask will land in the wrong place.
  • shape (rectangle / ellipse / custom) - geometry. Rectangle and ellipse are self-explanatory; custom is the escape hatch.
  • x / y / size_x / size_y - where the region sits and how large. This is the placement, in pixels.
  • feather (0–100) - edge softness. A little feather usually helps regional blending; a hard 0-pixel edge tends to leave visible seams.

Output is a single mask. Wire it into one of the entity*_mask slots on QwenEliGenEntityControl.

How to install it

Via ComfyUI Manager, search ComfyUI-QwenImageWanBridge, install, and restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/fblissjr/ComfyUI-QwenImageWanBridge

then restart ComfyUI. No models or heavy dependencies for this one - it's pure geometry. The models live downstream in your actual Qwen-Image graph.

Common issues & troubleshooting

The mask is in the wrong spot. Almost always a size mismatch: width/height here have to match the resolution of the image you're conditioning. A 1024×1024 mask against a 1216×832 generation puts your region somewhere you didn't intend.

Regions come out seamy. Bump feather. Regional techniques look collaged when the boundaries are too sharp - a soft edge lets the entity blend into the base conditioning instead of stamping a hard cutout.

You need anything shaped like a real object. This makes boxes and ovals, full stop. For an actual silhouette - a person, a hand, a specific object outline - paint the mask in an image editor or a proper masking node and bring it in through input_mask. And remember the wider caveat: the whole EliGen cluster in this pack is flagged experimental, so it's best treated as a place to experiment rather than a dependable pipeline.

CategoryQwenImage/EliGen

Inputs (9)

NameTypeDefaultDescription
widthINT102464–4096
heightINT102464–4096
shapeCOMBOrectangle3 options: rectangle, ellipse, custom
xINT2560–4096X position of shape center
yINT2560–4096Y position of shape center
size_xINT2568–4096Width of shape
size_yINT2568–4096Height of shape
featherINT00–100Edge softness in pixels
input_maskoptMASKOptional input mask to add to

Outputs (1)

NameTypeDescription
maskMASK