Nodes/comfyui_cv/CV BBoxes to Masks
ComfyUI Node

CV BBoxes to Masks

Filled rectangle masks from bounding boxes - the inverse of 'CV Masks to BBoxes'. Turns detections (YuNet, YOLO, Match Template, SAM3) into masks you can feed to inpainting, 'CV Crop by Masks', or any mask arithmetic. Empty input yields an empty MASK batch (rule 4 - never raises).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV BBoxes to Masks
  • space
  • bboxes
  • masks
  • count
mergefalse
Categoryimage/CV

Inputs (3)

NameTypeDefaultDescription
spaceNPARRAY,IMAGE,MASK,LATENTReference the boxes were measured on - only its height/width are used, so any IMAGE, MASK, NPARRAY or LATENT works. For a LATENT that is the latent-cell grid ('CV Scale BBoxes' converts between spaces).
bboxesBOUNDING_BOX[object Object]Core BOUNDING_BOX data: per-frame lists of {x, y, width, height} dicts - compatible with Draw BBoxes, Crop By Bounding Boxes, Image Crop, etc.
mergeoptBOOLEANfalseUnion every box into ONE mask instead of emitting one mask per box.

Outputs (2)

NameTypeDescription
masksMASKOne full-size mask per box (or a single merged mask), white inside the rectangle.
countINT