Nodes/ComfyUI S4Motion/đź’€Video Resize
ComfyUI Node

đź’€Video Resize

The resize node that won't wreck your aspect ratio

By S4MUEL-404·Created about a year ago·Updated 11 months ago· 4
đź’€Video Resize
  • video
  • images
  • Frame
â—„width512â–ş
â—„height512â–ş
â—„interpolationlanczosâ–ş
â—„methodkeep proportionâ–ş
â—„conditionalwaysâ–ş
â—„pad_color#000000â–ş

Most "resize" nodes in ComfyUI are just a width and a height - feed them a 16:9 clip and tell them you want 512x512, and they'll squeeze it flat like a pancake. đź’€Video Resize is not that node. It's the one from the S4Motion pack that actually thinks about aspect ratio, which is why it's the most-used node in the pack. If you're feeding a video into an image-to-video model or upscaler, this is where you fix the resolution without destroying the footage.

It takes either a video input (a VideoFromFile-style object from a video loader like VHS) or an images image sequence - the tooltip says it plainly: "Video input from video nodes" and "Image sequence input". You get back a single Frame IMAGE output, which is just your whole clip as a batch of frames at the new size. Wire that into a SaveAnimatedWEBP, a save-video node, or straight into a sampler.

The inputs that matter:

  • method - this is the whole point. stretch forces both dimensions (the pancake). keep proportion (default) fits the clip inside your target box and preserves the ratio. fill / crop scales to cover the box and crops the overflow. pad letterboxes it with the pad_color hex. For anything except deliberate squishing, keep the default.
  • condition - set downscale if bigger and the node skips frames that are already smaller than the target. That's the one you want before a model with a hard resolution cap: it never upscales stuff that doesn't need it, which keeps quality and saves time.
  • interpolation - lanczos is the default and it's the right call for downscaling. Drop to bilinear or area if you want speed; nearest is for pixel-art.
  • width / height - the target box. 16 to 8192.

Mechanically it's nothing exotic: the node converts the input to PIL frames, runs a condition check, then resizes every frame with your chosen resampling method. The whole clip is processed, not just a thumbnail - this is where OpenCV earns its keep, because VIDEO-type inputs are decoded through cv2.

Install

Same as the rest of the pack - ComfyUI Manager, search "S4Motion", install, restart. Or manually:

cd ComfyUI/custom_nodes/
git clone https://github.com/S4MUEL-404/ComfyUI-S4Motion.git
pip install -r ComfyUI-S4Motion/requirements.txt

Then restart ComfyUI. All nodes show up under the đź’€S4Motion category.

Where people get burned

  • VIDEO input needs OpenCV. If you feed it a video object and opencv-python isn't installed, you'll get a hard error: "OpenCV is required for video processing but not available." If you only ever feed IMAGE sequences, you can run on Pillow alone.
  • condition is evaluated per source size, not per frame. If your clip has mixed resolutions it picks based on the first frame. Rare, but worth knowing.
  • pad_color is a hex string - #000000 default. If you type a color name it just falls back to black, silently.

Honestly, the community doesn't talk about this pack much - a reddit corpus search for S4Motion turns up zero discussion, so if you found a workflow using đź’€Video Resize, it came from the pack's examples/ folder. It's a small, quiet tool that does one job well. Pair it with đź’€Video Info to check what you're actually feeding in, and you'll be fine.

Categoryđź’€S4Motion

Inputs (8)

NameTypeDefaultDescription
widthINT51216–8192—
heightINT51216–8192—
interpolationCOMBOlanczos5 options: nearest, bilinear, bicubic, area, lanczos
methodCOMBOkeep proportion4 options: stretch, keep proportion, fill / crop, pad
conditionCOMBOalways5 options: always, downscale if bigger, upscale if smaller, if bigger area, if smaller area
pad_colorSTRING#000000—
videooptVIDEOVideo input from video nodes
imagesoptIMAGEImage sequence input

Outputs (1)

NameTypeDescription
FrameIMAGE—