Nodes/MachinePainting Nodes/πŸ‘Ύ Mask Composite Pro 6X
ComfyUI Node

πŸ‘Ύ Mask Composite Pro 6X

The six-mask union, still one node

By machinepaintingΒ·Created 10 months agoΒ·Updated 4 months agoΒ· 9
πŸ‘Ύ Mask Composite Pro 6X
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • mask_6
  • mask
β—„output_selectallβ–Ί
β—„invert_outputfalseβ–Ί
β—„blur_mask_10.0β–Ί
β—„grow_shrink_mask_10β–Ί
β—„opacity_mask_11.00β–Ί
β—„blur_mask_20.0β–Ί
β—„grow_shrink_mask_20β–Ί
β—„opacity_mask_21.00β–Ί
β—„blur_mask_30.0β–Ί
β—„grow_shrink_mask_30β–Ί
β—„opacity_mask_31.00β–Ί
β—„blur_mask_40.0β–Ί
β—„grow_shrink_mask_40β–Ί
β—„opacity_mask_41.00β–Ί
β—„blur_mask_50.0β–Ί
β—„grow_shrink_mask_50β–Ί
β—„opacity_mask_51.00β–Ί
β—„blur_mask_60.0β–Ί
β—„grow_shrink_mask_60β–Ί
β—„opacity_mask_61.00β–Ί

If you've ever stacked four or five masks by hand - chaining mask-combine nodes until your graph looks like a plate of spaghetti - you know why this exists. Mask Composite Pro 6X is the same engine as Mask Composite Pro 2X but with six mask inputs, each with its own blur, grow/shrink, and opacity. One node turns a pile of masks into a single clean union. For complex composites - subject, hair, prop, clothing, shadow, backdrop - it collapses an entire wall of nodes into a rectangle.

How it works

Identical machinery to the 2X sibling, just multiplied: every mask gets an optional blur_mask_N (0–50), grow_shrink_mask_N (βˆ’100 to 100), and opacity_mask_N (0–1), then all present masks merge with a screen blend (1 βˆ’ (1βˆ’a)(1βˆ’b)), which accumulates overlapping regions smoothly instead of summing them to a hard white. Mask sizes that don't match mask_1 are resized to match automatically. mask_1 is required; mask_2 through mask_6 are all optional, so the node scales gracefully from "two masks" to "six masks" without you picking a different node.

The selector, upgraded

The output_select dropdown is where 6X flexes: all gives the union, but you can also pick 1 through 6 to get any single processed mask in isolation. That means one node serves as both a combiner and a per-mask isolator - set it to all for your final composite and switch it to 3 when you want to check what mask 3 looks like after its blur and shrink. invert_output flips the final result for pipelines that want inverted masks.

When 2X vs 6X

Reach for 2X for quick two-mask unions (simpler surface, fewer sliders). Reach for 6X the moment your scene has more than two elements or you anticipate the graph growing - the optional inputs mean you're not paying for six masks until you wire them. Both share the same math, so switching between them is painless.

Install

MachinePainting Nodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/machinepainting/ComfyUI-MachinePaintingNodes.git
pip install -r requirements.txt

or ComfyUI Manager β†’ "MachinePaintingNodes" β†’ install β†’ restart.

Gotchas

The screen blend is the thing people misread: overlap regions get brighter, and with six masks the accumulated overlap can look like a hot white core. That's correct screen behavior - tame it with opacity_mask_N, or use output_select to check which mask is causing the blowout. And if you leave mask_2–mask_6 disconnected, those channels are skipped entirely, so don't expect an error - you'll just silently get a 1-mask pass-through. Finally, all masks are normalized to mask_1's dimensions, so make mask_1 your highest-res, most-trusted mask.

CategoryMachinePaintingNodes/Mask

Inputs (26)

NameTypeDefaultDescription
mask_1MASKβ€”
output_selectCOMBOall7 options: all, 1, 2, 3, 4, 5, +1
invert_outputBOOLEANfalseβ€”
mask_2optMASKβ€”
mask_3optMASKβ€”
mask_4optMASKβ€”
mask_5optMASKβ€”
mask_6optMASKβ€”
blur_mask_1optFLOAT0.00–50β€”
grow_shrink_mask_1optINT0-100–100β€”
opacity_mask_1optFLOAT1.000–1β€”
blur_mask_2optFLOAT0.00–50β€”
grow_shrink_mask_2optINT0-100–100β€”
opacity_mask_2optFLOAT1.000–1β€”
blur_mask_3optFLOAT0.00–50β€”
grow_shrink_mask_3optINT0-100–100β€”
opacity_mask_3optFLOAT1.000–1β€”
blur_mask_4optFLOAT0.00–50β€”
grow_shrink_mask_4optINT0-100–100β€”
opacity_mask_4optFLOAT1.000–1β€”
blur_mask_5optFLOAT0.00–50β€”
grow_shrink_mask_5optINT0-100–100β€”
opacity_mask_5optFLOAT1.000–1β€”
blur_mask_6optFLOAT0.00–50β€”
grow_shrink_mask_6optINT0-100–100β€”
opacity_mask_6optFLOAT1.000–1β€”

Outputs (1)

NameTypeDescription
maskMASKβ€”