ComfyUI Node
Mask Blend
Blend two masks with add / subtract / intersect / exclude, or keep one half by direction, then optionally replace the non-zero bounding box with a solid rectangle according to the BBOX rule and report that rectangle's width and height. Sizes are matched automatically and a batch uses the combined extent of every frame.
Mask Blend
- mask1
- mask2
- mask
- width
- height
◄blend_modesubtract►
◄bboxoff►
◄aligncenter►
CategoryQG-tools/Mask
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| blend_mode | COMBO | subtract | add / subtract / intersect / exclude work per pixel (exclude is NOR: the area neither mask covers). left / right / top / bottom compare the two masks' non-zero extents, cut at the nearer edge and keep that half of mask 1 only. |
| bbox | COMBO | off | Replace the non-zero bounding box of the blended mask with a solid white rectangle (not a crop). off outputs the blended mask as it is and still reports the box size. The other rules rescale the box 1:1; align decides where it lands. |
| align | COMBO | center | Where the new rectangle sits relative to the original bounding box. Has no effect when bbox is off or original. |
| mask1opt | MASK | First mask. Its canvas size is the reference; the other mask is resized to match when the sizes differ. | |
| mask2opt | MASK | Second mask. Leave it unconnected to use an all-black mask of the same size. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |
| width | INT | — |
| height | INT | — |