ComfyUI Node
Mask Deduplicate
A ComfyUI node in MultiMaskOps with 4 inputs and 3 outputs.
Mask Deduplicate
- masks
- masks
- removed_count
- group_images
◄iou_threshold0.90►
◄keep▾►
◄threshold0.50►
CategoryMultiMaskOps
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | A list of masks to deduplicate. | |
| iou_threshold | FLOAT | 0.900–1 | Minimum Intersection-over-Union for two masks to count as duplicates. Grouping is transitive: if A~B and B~C, all three merge. Higher = stricter (only near-identical masks merge). |
| keep | COMBO | How to collapse each duplicate group. largest/smallest/first pick one existing mask; OR = union of the group (max); AND = intersection of the group (min). | |
| threshold | FLOAT | 0.500–1 | Binarization cutoff for computing IoU and mask areas. Pixels >= threshold count as 'on'. Does not affect AND/OR output values. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| masks | MASK | The deduplicated masks, one per duplicate group. |
| removed_count | INT | How many masks were removed as duplicates. |
| group_images | IMAGE | One image per duplicate group, each mask in a distinct color (overlaps blend). Only groups with 2+ members are shown. |