ComfyUI Node

Mask Detect

Checks whether a mask covers enough area to be worth branching on: a pixel counts when it is strictly above 0.5, the active ratio is taken over the whole mask with every frame sharing one denominator, and the answer is True when that ratio reaches the minimum. A minimum of 0 skips the area test, so any single active pixel answers True; an all-black mask is always False. Matches Goohaitools' mask-detect node value for value, so the same numbers work in both.

By live1617·Created about a month ago·Updated a day ago· 4
Mask Detect
  • mask
  • has_mask
◄min_ratio3.0►
CategoryQG-tools/Mask

Inputs (2)

NameTypeDefaultDescription
maskMASKThe mask to test. A pixel counts when it is above 0.5; a batch is judged as a whole - one ratio across every frame, not one verdict per frame.
min_ratioFLOAT3.00–10Smallest share of active pixels, in percent (0-10), for the answer to be True. 0 skips the area test and only asks whether any pixel is active. The same number means the same thing in Goohaitools' mask-detect node.

Outputs (1)

NameTypeDescription
has_maskBOOLEAN—