ComfyUI Node
π§ Crop Image using Mask
Crops an image based on a mask's bounding box, with optional padding and dimension constraints.
π§ Crop Image using Mask
- image
- mask
- cropped_image
- cropped_mask
- uncrop_info
βpadding0βΊ
βmultiple_of16βΊ
CategorySuperNodes/Image
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The source image to be cropped. | |
| mask | MASK | The binary mask defining the region of interest to crop. | |
| padding | INT | 00β4096 | Amount of padding (in pixels) to add around the mask bounding box. |
| multiple_of | INT | 161β512 | Ensure the crop dimensions are a multiple of this value (critical for UNet based processing). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cropped_image | IMAGE | The cropped image region. |
| cropped_mask | MASK | The cropped mask region. |
| uncrop_info | CROP_INFO | Metadata containing coordinates and original size, required for restoration. |