Nodes/Simple Video Effects/Zoom (Direction + Amount Type)
ComfyUI Node

Zoom (Direction + Amount Type)

The Ken Burns node

By scofano·Created 10 months ago·Updated 20 days ago· 0
Zoom (Direction + Amount Type)
  • images
  • images
  • info
directionZoom In
amount_typePixels per Frame
pixels_per_frame1.0
zoom_percentage110
easeLinear
random_seed0
smooth_subpixeltrue

This is the pack's flagship, and it's the one you'll reach for constantly. A slow push-in or pull-back is the cheapest way to make a generated video feel alive - a still image becomes a Ken Burns shot, a static render becomes a subtle dolly move. The Zoom Sequence node takes a batch of frames and applies a smooth, eased zoom across them while keeping the canvas size and aspect ratio intact. No black bars, no weird crops, no resolution surprise at the end.

It sits in the graph as a pure image-transform node: frames in, frames out, same shape. That makes it the natural post-processing step after any video generation - feed it the frames from a Wan or LTX render, or from a still you upscaled and want to animate.

How it works

Each frame gets an eased progress value (0 → 1 across the batch). That progress is converted into a crop margin, which shrinks toward the center of the frame, and the crop is resized back to the original dimensions. Because the crop is proportional on both axes, the aspect ratio is preserved and the zoom stays centered.

The detail worth knowing: with smooth_subpixel on (the default), the margin becomes a continuous zoom factor applied with grid_sample subpixel sampling. That matters for slow, long zooms - the integer-pixel crop/resize mode shows visible stepping, and the subpixel path is what keeps a 5-second drift buttery. Leave it on unless you have a reason to want crisp integer crops.

Inputs that matter

  • images - your batched frames.
  • direction - Zoom In, Zoom Out, or Random. Zoom Out from a still is the classic Ken Burns pull-back.
  • amount_type - Pixels per Frame (fixed zoom speed per frame, controlled by pixels_per_frame) or Target Percentage (reach a target zoom over the whole sequence, controlled by zoom_percentage, default 110 = 110%). For a whole video clip, Target Percentage is usually the one - a "pixels per frame" zoom on a long clip can over-zoom fast.
  • ease - Linear, Ease_In, Ease_Out, Ease_In_Out, or Random. Ease_In_Out feels the most "filmed"; Linear is fine for short clips.
  • random_seed - only relevant in Random modes. 0 = fresh random roll each execution (the node deliberately breaks ComfyUI's cache so you actually get a new one); > 0 = reproducible.
  • smooth_subpixel - on by default, as above.

Outputs are images (same shape as input) and info (a diagnostics string with applied margins and safe-limit notes - the node clamps zoom so you can't crop past the canvas edge).

Installing it

Part of the Simple Video Effects pack:

cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt

Restart ComfyUI, or install through ComfyUI Manager (search "Simple Video Effects"). Pure torch image math - no models, no ffmpeg needed for this one.

Common issues

Most confusion is the two amount_type modes. If your zoom is barely moving, you're in Pixels per Frame with a tiny pixels_per_frame (like 0.5) on a short clip - bump it. If your zoom goes way too far, you're in Target Percentage with a big zoom_percentage and a long clip - remember it targets that percentage over the whole sequence, so 110% on a 2-second clip and 110% on a 20-second clip look very different in speed. And if Random direction feels like it never changes, that's the random_seed = 0 behavior working as intended - set a seed for reproducibility.

CategorySimple Video Effects/Image Processing

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE
directionCOMBOZoom In3 options: Zoom In, Zoom Out, Random
amount_typeCOMBOPixels per Frame2 options: Pixels per Frame, Target Percentage
pixels_per_frameFLOAT1.0
zoom_percentageINT110100–10000
easeCOMBOLinear5 options: Linear, Ease_In, Ease_Out, Ease_In_Out, Random
random_seedINT00–2147483647
smooth_subpixelBOOLEANtrue

Outputs (2)

NameTypeDescription
imagesIMAGE
infoSTRING