Nodes/ComfyUI-SuperNodes/🐧 Crop Image using Mask
ComfyUI Node

🐧 Crop Image using Mask

Crops an image based on a mask's bounding box, with optional padding and dimension constraints.

By sonnyboxΒ·Created 10 months agoΒ·Updated 26 days agoΒ· 7
🐧 Crop Image using Mask
  • image
  • mask
  • cropped_image
  • cropped_mask
  • uncrop_info
β—„padding0β–Ί
β—„multiple_of16β–Ί
CategorySuperNodes/Image

Inputs (4)

NameTypeDefaultDescription
imageIMAGEThe source image to be cropped.
maskMASKThe binary mask defining the region of interest to crop.
paddingINT00–4096Amount of padding (in pixels) to add around the mask bounding box.
multiple_ofINT161–512Ensure the crop dimensions are a multiple of this value (critical for UNet based processing).

Outputs (3)

NameTypeDescription
cropped_imageIMAGEThe cropped image region.
cropped_maskMASKThe cropped mask region.
uncrop_infoCROP_INFOMetadata containing coordinates and original size, required for restoration.