Nodes/ComfyUI-Koolook/Easy Resize (deprecated, use 'Easy Resize (Koolook)')
ComfyUI Node

Easy Resize (deprecated, use 'Easy Resize (Koolook)')

Resize an image to a target aspect ratio and model-friendly divisible size. Use stretch, letterbox, or pillarbox; optional masks can produce a composed image, inverted mask, color panel, and final/original size outputs.

By malkuthro·Created 11 months ago·Updated 23 days ago· 7
Easy Resize (deprecated, use 'Easy Resize (Koolook)')
  • image
  • mask
  • IMAGE
  • composed_IMAGE
  • MASK
  • inverted_MASK
  • width
  • height
  • COLOR_PANEL
  • original_width
  • original_height
  • original_aspect_ratio
base_onWidth
base_size512
aspect_ratio16:9
divisible_by32
upscale_methodnearest-exact
keep_proportionstretch
crop_positioncenter
pad_color_modeBlack
panel_color_modeBlack
devicecpu
pad_color0, 0, 0
panel_color0, 0, 0
invert_composed_MASKfalse
CategoryKoolook/Image

Inputs (15)

NameTypeDefaultDescription
imageIMAGE
base_onCOMBOWidthChoose which target dimension is driven by base_size; the other is computed from aspect_ratio.
base_sizeINT5121–16384Target width or height before snapping to divisible_by.
aspect_ratioSTRING16:9Target ratio as W:H, e.g. 16:9, 1:1, or 9:16.
divisible_byINT321–128Snap final width and height to a multiple; use the model's latent/grid requirement.
upscale_methodCOMBOnearest-exactComfyUI resize filter used for the image and mask.
keep_proportionCOMBOstretchstretch fills the target exactly; letterbox/pillarbox preserve proportions and add bars.
crop_positionCOMBOcenterPlacement of the preserved image when bars are added. Top/bottom affect letterbox; left/right affect pillarbox.
pad_color_modeCOMBOBlackColor for letterbox/pillarbox bars. Custom reads pad_color.
panel_color_modeCOMBOBlackColor for COLOR_PANEL and masked composed_IMAGE background. Custom reads panel_color.
deviceCOMBOcpuDevice used for resize/composite tensors.
maskoptMASK
pad_coloroptSTRING0, 0, 0Custom RGB bar color in 0..1 floats, e.g. 0, 0, 0 or 1, 0.5, 0.
panel_coloroptSTRING0, 0, 0Custom RGB color for COLOR_PANEL and mask composition background.
invert_composed_MASKoptBOOLEANfalseFlip which side of the resized mask shows IMAGE vs COLOR_PANEL in composed_IMAGE.

Outputs (10)

NameTypeDescription
IMAGEIMAGE
composed_IMAGEIMAGE
MASKMASK
inverted_MASKMASK
widthINT
heightINT
COLOR_PANELIMAGE
original_widthINT
original_heightINT
original_aspect_ratioSTRING