ComfyUI Node

ResizeImageBatch

Resize your image batch and get the actual size back

By Pablerdo·Created about a year ago·Updated about a year ago· 1
ResizeImageBatch
  • images
  • get_size_from_image
  • images
  • width
  • height
output_width512
output_height512
upscale_methodbilinear
keep_proportionfalse
divisible_by1
cropdisabled
width_input
height_input

Resizing a batch of images is the easy part. Knowing what size you actually ended up with - after the aspect-ratio logic and the divisibility rounding did their thing - is the part that bites everyone. ResizeImageBatch does both, and the second half is the reason you'd reach for it.

This is a small, quiet node from the backend of Zeptaframe, an AI-native video editor built by the same author (Pablo "Pablerdo" Salamanca, a UPenn CS student who demoed it at CVPR 2025). Zeptaframe drives ComfyUI in the background, and this pack is the "payload" of utility nodes that keep its pipeline honest. ResizeImageBatch is the frame resizer: feed it a batch of IMAGE tensors, and it gives you back a batch at your target size plus the real final dimensions.

How it works

It's a thin wrapper around ComfyUI's own common_upscale, with the housekeeping done for you. The node reads the batch shape, decides on the target width and height, shuffles channels into the layout the upscaler wants, resizes, and moves them back. It offers five interpolation methods - nearest-exact, bilinear, area, bicubic, lanczos - and these are plain interpolation, not generative upscaling. No invented detail, no faces rewritten. If your source is already sharp, that's exactly what you want; if you want a model to hallucinate new detail, this isn't the node (see the upscaling essay in the KB: "more pixels" and "more detail" are different jobs).

The inputs that matter

  • output_width / output_height - the widgets, default 512, up to 8192. Set either to 0 to keep the original dimension. This is where your target size actually comes from (see the gotcha below).
  • keep_proportion - preserves aspect ratio by fitting the batch inside the requested box using the smaller scale ratio.
  • divisible_by - rounds the final dimensions down to a multiple of this value. Genuinely handy when you need frame sizes to line up with video or latent-friendly resolutions.
  • crop - disabled or center. When you've asked for exact dimensions without keeping proportion, center crops the overflow instead of squishing the image.
  • upscale_method - nearest-exact for pixel art, lanczos or bicubic for clean upscales, area for downscaling. The bilinear default is fine for most work.

The gotcha nobody warns you about

The info schema lists width_input, height_input, and an optional get_size_from_image, and the node description documents a whole priority order where a reference image's size overrides the widgets. Here's the thing: in the shipped code, that override block is commented out. Those three inputs are accepted and silently ignored. Don't build a workflow that relies on get_size_from_image stealing its size from a reference image - it won't happen in this version. The widget values are the real source of truth. (A side effect: since keep_proportion and divisible_by are gated on "no reference image," which is always true in practice, they always run.)

Outputs

Three outputs: images (the resized batch), and width / height as integers - the actual final dimensions after all the math. Wire those into downstream nodes instead of hardcoding, especially when keep_proportion is on and the result doesn't match your widget numbers. That's the part of this node I actually like.

Installing it

ComfyUI Manager: search ComfyUI-ResizeZeptaPayload, install, restart. Or the old-fashioned way:

cd ComfyUI/custom_nodes
git clone https://github.com/Pablerdo/ComfyUI-ResizeZeptaPayload
# restart ComfyUI

No model downloads, no keys. One warning: the repo's requirements.txt lists a big pile of dependencies (librosa, peft, huggingface_hub, mss, and friends), but the shipped code only touches cv2, PIL, torch, numpy, and json - all already present in ComfyUI. That requirements file looks copied from the author's larger wrapper repos. Don't let it scare you, and don't bother with the pip install step.

Honest take: if you just need to upscale, the built-in ImageScale or a proper upscaler pack does more. Reach for this when you're processing batches and want the true resulting size handed back as a wire - which, if you're running Zeptaframe-style video workflows, you will be. It's unglamorous, it works, and it's small enough to read in full if you're ever suspicious of it.

CategoryResizeZeptaPayload

Inputs (10)

NameTypeDefaultDescription
imagesIMAGE
output_widthINT5120–8192
output_heightINT5120–8192
upscale_methodCOMBObilinear5 options: nearest-exact, bilinear, area, bicubic, lanczos
keep_proportionBOOLEANfalse
divisible_byINT11–512
cropCOMBOdisabled2 options: disabled, center
width_inputINT
height_inputINT
get_size_from_imageoptIMAGE

Outputs (3)

NameTypeDescription
imagesIMAGE
widthINT
heightINT