Nodes/ComfyUI-MultiMaskOps/Mask Deduplicate
ComfyUI Node

Mask Deduplicate

A ComfyUI node in MultiMaskOps with 4 inputs and 3 outputs.

By INuBq8·Created about a month ago·Updated about a month ago· 0
Mask Deduplicate
  • masks
  • masks
  • removed_count
  • group_images
iou_threshold0.90
keep
threshold0.50
CategoryMultiMaskOps

Inputs (4)

NameTypeDefaultDescription
masksMASKA list of masks to deduplicate.
iou_thresholdFLOAT0.900–1Minimum 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).
keepCOMBOHow to collapse each duplicate group. largest/smallest/first pick one existing mask; OR = union of the group (max); AND = intersection of the group (min).
thresholdFLOAT0.500–1Binarization cutoff for computing IoU and mask areas. Pixels >= threshold count as 'on'. Does not affect AND/OR output values.

Outputs (3)

NameTypeDescription
masksMASKThe deduplicated masks, one per duplicate group.
removed_countINTHow many masks were removed as duplicates.
group_imagesIMAGEOne image per duplicate group, each mask in a distinct color (overlaps blend). Only groups with 2+ members are shown.