ComfyUI Node
Crop Mask Holes
Crop all holes (background regions) in a binary mask and corresponding areas in an optional image. Ensures each crop’s dimensions are multiples of a user-specified alignment value. If expansion exceeds image bounds, pads using edge replication (OpenCV BORDER_REPLICATE style).
Crop Mask Holes
- mask
- image
- cropped_masks
- cropped_images
- crop_boxes
◄align_multiple16►
CategoryBmad/Panels
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| align_multiple | INT | 161–512 | — |
| imageopt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cropped_masks | MASK | — |
| cropped_images | IMAGE | — |
| crop_boxes | BBOX | — |