πΎ Mask Composite Pro 6X
The six-mask union, still one node
- mask_1
- mask_2
- mask_3
- mask_4
- mask_5
- mask_6
- mask
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.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| mask_1 | MASK | β | |
| output_select | COMBO | all | 7 options: all, 1, 2, 3, 4, 5, +1 |
| invert_output | BOOLEAN | false | β |
| mask_2opt | MASK | β | |
| mask_3opt | MASK | β | |
| mask_4opt | MASK | β | |
| mask_5opt | MASK | β | |
| mask_6opt | MASK | β | |
| blur_mask_1opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_1opt | INT | 0-100β100 | β |
| opacity_mask_1opt | FLOAT | 1.000β1 | β |
| blur_mask_2opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_2opt | INT | 0-100β100 | β |
| opacity_mask_2opt | FLOAT | 1.000β1 | β |
| blur_mask_3opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_3opt | INT | 0-100β100 | β |
| opacity_mask_3opt | FLOAT | 1.000β1 | β |
| blur_mask_4opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_4opt | INT | 0-100β100 | β |
| opacity_mask_4opt | FLOAT | 1.000β1 | β |
| blur_mask_5opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_5opt | INT | 0-100β100 | β |
| opacity_mask_5opt | FLOAT | 1.000β1 | β |
| blur_mask_6opt | FLOAT | 0.00β50 | β |
| grow_shrink_mask_6opt | INT | 0-100β100 | β |
| opacity_mask_6opt | FLOAT | 1.000β1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | β |