-
Notifications
You must be signed in to change notification settings - Fork 1
Mask Batch Blend
github-actions[bot] edited this page Aug 15, 2026
·
4 revisions
Back to Wiki Home
The Mask Batch Blend node blends multiple masks together using different operations (add, max, average). It can handle masks with different dimensions and batch sizes.
-
Class name:
zyd232 MaskBatchBlend -
Category:
zyd232 Nodes -
Output:
MASK
| Input | Type | Description |
|---|---|---|
| masks | MASK |
Masks to blend (supports batches) |
| operation | ["add", "max", "average"] |
Blend operation |
| Output | Type | Description |
|---|---|---|
| MASK | MASK |
The blended single mask |
The node automatically handles the input tensor dimensions:
-
2D tensor
(height, width)— a batch dimension is added automatically. -
4D tensor
(batch, 1, height, width)— the channel dimension is removed automatically. - Other shapes raise an error.
| Operation | Description |
|---|---|
| add | Sums all masks together (overlay effect) |
| max | Takes the maximum value at each pixel across all masks |
| average | Computes the average of all masks |
- Batch size 0 (no masks) — returns an all-zero mask.
- Batch size 1 (only one mask) — returns that mask directly without blending.
-
Overlay multiple selections: use
addto stack multiple masks into a brighter combined selection. -
Union: use
maxto keep any region covered by at least one mask. -
Smooth transition: use
averageto get the average intensity of multiple masks.
Back to Wiki Home