main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
comfyui-mask-batch-union
A ComfyUI custom node that collapses a batch of masks down to a single mask.
Node: Mask Batch Union
Category: mask
Accepts a batch of masks (shape [B, H, W]) and merges them into one mask using either:
- max — pixel-wise maximum across the batch (default). Good for overlapping regions where any mask should activate.
- sum_clamp — sum all masks then clamp to
[0, 1]. Useful when you want additive intensity up to full white.
Inputs
| Name | Type | Description |
|---|---|---|
| masks | MASK | Batch of masks to merge |
| mode | max | sum_clamp | Merge strategy |
Output
| Type | Description |
|---|---|
| MASK | Single merged mask |
Languages
Python
100%