Nodes/ComfyUI Essentials/πŸ”§ Image Resize
ComfyUI Node Runs on cloud

πŸ”§ Image Resize

Image Resize (ComfyUI Essentials)

By cubiqΒ·Created 3 years agoΒ·Updated about a year agoΒ· 1,152
πŸ”§ Image Resize
  • image
  • IMAGE
  • width
  • height
β—„width512β–Ί
β—„height512β–Ί
β—„interpolationβ–Ύβ–Ί
β—„methodβ–Ύβ–Ί
β—„conditionβ–Ύβ–Ί
β—„multiple_of0β–Ί

If you've ever wired up a plain "Upscale Image" node and then fought with cropping, padding, and "why is my width not divisible by 8," this is the node that ends that fight. Image Resize does resize, crop, pad, aspect-ratio math, and a "only resize if X" condition all in one box, and it tells you the exact size it landed on. It's one of the most-installed nodes in the whole Essentials pack for a reason.

Why you'd reach for it

Core ComfyUI splits resizing across a few nodes and none of them keep proportion, snap to a multiple, and report the result. This one does all three. The classic use is prepping an image to feed a model that's picky about dimensions - SDXL wants its trained buckets, Flux wants divisible-by-64 (see the resolution notes in any model guide), and controlnet/inpaint passes want the input to match the latent exactly. Instead of eyeballing it, you set the target and let the node do the arithmetic.

How it works

You give it a target width and height, then method decides what happens when the aspect ratios don't match:

  • stretch - squish to fit, ignoring aspect ratio (rarely what you want)
  • keep proportion - fit inside the box, no distortion; set one dimension to 0 and it derives that side from the other
  • fill / crop - cover the box and crop the overflow
  • pad - fit inside and pad the empty space

interpolation is the sampling filter (lanczos is the sharp default for downscaling; bilinear/bicubic are softer). multiple_of snaps the final dimensions to a multiple of whatever you set - put 8 or 64 here and you'll never hand a model an off-grid size again. condition lets the node skip work unless a rule is met: "downscale if bigger", "upscale if smaller", "if bigger area", and so on - handy in a batch where some inputs are already the right size.

Inputs and outputs that matter

The three you'll actually touch: width/height, method (start with "keep proportion"), and multiple_of (set it to your model's grid). Outputs are the resized IMAGE plus width and height as integers - and those integers are the real point. Because keep-proportion and multiple_of change the final size, you wire those width/height outputs into whatever comes next (an empty latent, a crop, a paste-back) so everything stays in lockstep.

Installing it

This ships in ComfyUI Essentials by cubiq (Matteo Spinelli - the same person behind the IPAdapter nodes, and the Latent Vision YouTube channel). Easiest path: open ComfyUI Manager, search ComfyUI Essentials, install, restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials

then restart ComfyUI. The node shows up as πŸ”§ Image Resize under essentials/image manipulation. If a workflow errors with ImageResize+ not found, this pack is what you're missing - note the + on the class name.

One heads-up on the pack itself: as of April 2025 cubiq put it in maintenance-only mode (he stepped back from ComfyUI). That's not a warning to avoid it - it's stable and everywhere - just don't expect new features. Image Resize in particular has been feature-complete for ages.

Common issues

The usual confusion is proportion vs. the width/height you typed. With "keep proportion", your requested 512Γ—512 becomes whatever fits - say 512Γ—384 - so read the node's width/height outputs, not your inputs, downstream. If a later node complains about mismatched sizes, that's almost always the cause. And if a model rejects your image for being off-grid, set multiple_of instead of hand-tuning the numbers.

Categoryessentials/image manipulation

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
widthINT5120–16384β€”
heightINT5120–16384β€”
interpolationCOMBO6 options: nearest, bilinear, bicubic, area, nearest-exact, lanczos
methodCOMBO4 options: stretch, keep proportion, fill / crop, pad
conditionCOMBO5 options: always, downscale if bigger, upscale if smaller, if bigger area, if smaller area
multiple_ofINT00–512β€”

Outputs (3)

NameTypeDescription
IMAGEIMAGEβ€”
widthINTβ€”
heightINTβ€”