Nodes/ComfyUI Smart Scaler/Batch Frame Processor
ComfyUI Node

Batch Frame Processor

Scaling every frame of a video to the same size — without the flicker

By babydjac·Created about a year ago·Updated about a year ago· 1
Batch Frame Processor
  • images
  • scaled_images
  • scaled_size
target_resolutionWan-Small
fit_strategyresize
force_multiple_64true

Batch Frame Processor is the vid2vid workhorse of the ComfyUI Smart Scaler pack. Where the other scaler nodes handle a single image, this one takes a whole batch of frames - a video's worth of images in ComfyUI's IMAGE format - and scales every one of them to the same resolution bucket. If you're running Wan 2.1 vid2vid and every frame has to agree with its neighbors, this is the node you want.

Why consistency matters. Video is where per-frame resizing betrays you. If you scale each frame individually and they land on slightly different dimensions - or, worse, if different frames pick different crops - the resulting clip shimmers and jitters in a way that reads instantly as broken. The fix isn't better resizing; it's making one decision and applying it to all frames. That's exactly what this node does: it looks at the first frame, picks a target bucket, and scales every frame to match. Uniform input, uniform output, no flicker at the seams.

How it works

You feed a batch into images, pick a target_resolution - SDXL, Wan-Small, Wan-Medium, or Wan-Large (defaults to Wan-Small) - and set a fit_strategy (resize default, pad, crop), with force_multiple_64 on by default. The node computes the aspect ratio of the first frame, picks the closest portrait/landscape/square variant within your chosen family, then applies that same scale to every frame in the batch with LANCZOS resampling. Output is scaled_images (the whole batch, ready to feed straight into a Wan vid2vid pipeline) and scaled_size, a string like "768x1152" describing the target it chose.

The resolution families mirror the rest of the pack: Wan-Small is 512x768, Wan-Medium is 768x1152, Wan-Large is 1024x1536, each with landscape and square variants, and SDXL is the 1024x1536 family. Those are the community-standard Wan buckets, so picking Wan-Medium for a 1000x2000 portrait clip gets you the 768x1152 ballpark that Wan was trained around.

The gotchas, briefly

  • Same fit_strategy caveat as the single-image nodes. With the default resize, frames keep their aspect ratio and land on the nearest multiple-of-64 size, which may not be exactly the bucket name. pad and crop force the exact target with bars or center-crop. scaled_size reports the target bucket, so if your actual frames differ slightly under resize, that's expected behavior, not a bug.
  • The first frame decides for everyone. If your source frames have mixed dimensions, they all get normalized to whatever bucket the first frame's aspect ratio picks. That's the feature - it's what guarantees consistency - but if your first frame is an outlier (say, a title card in a different shape), the whole batch inherits its bucket.
  • This is a frame normalizer, not an upscaler. It's scaling into a target bucket, usually down or across, to feed a generative model. If you want to add real resolution, that's a separate upscaling stage (SeedVR2 territory) downstream.

Installation

Same pack, same routine: ComfyUI Manager → search comfyui-smart-scaler → install → restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/babydjac/comfyui-smart-scaler.git
pip install torch Pillow numpy

Dependencies are light - torch, Pillow, numpy - and there are no model files to fetch. It appears under SmartScaler/Video in the node menu.

Common issues

The failure mode to know about: frames that are already a mix of sizes will surprise you when they all get funneled into the first frame's bucket - usually that's exactly what you asked for, but verify the first frame is representative. And if you're using this for img2vid rather than vid2vid (a single starting frame), you're using the wrong node - the single-image Wan Video Frame Scaler is lighter weight and keeps things simpler for one frame.

CategorySmartScaler/Video

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
target_resolutionCOMBOWan-Small4 options: SDXL, Wan-Small, Wan-Medium, Wan-Large
fit_strategyCOMBOresize3 options: resize, pad, crop
force_multiple_64optBOOLEANtrue

Outputs (2)

NameTypeDescription
scaled_imagesIMAGE
scaled_sizeSTRING