Nodes/comfyui-image-crop-by-mask-multiple/Image Crop By Mask And Resize (Multiple)
ComfyUI Node

Image Crop By Mask And Resize (Multiple)

Crops an image/mask to the mask's bounding box (with optional padding and min/max size clamps), then resizes all batch items to a uniform resolution derived from base_resolution and the widest aspect ratio in the batch. Unlike the original node (which always rounds to a multiple of 16), this version exposes a `multiple` input so the final image, mask, and bbox dimensions are guaranteed divisible by whatever value you choose.

By mo-akkakk·Created 23 days ago·Updated 23 days ago· 1
Image Crop By Mask And Resize (Multiple)
  • image
  • mask
  • images
  • masks
  • bbox
base_resolution512
padding0
min_crop_resolution128
max_crop_resolution512
multiple16
CategoryKJNodes/image

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
maskMASK
base_resolutionINT5120–16384
paddingINT00–16384
min_crop_resolutionINT1280–16384
max_crop_resolutionINT5120–16384
multipleINT161–16384Forces output image/mask width & height (and bbox size) to be an exact multiple of this value.

Outputs (3)

NameTypeDescription
imagesIMAGE
masksMASK
bboxBBOX