Nodes/WtlNodes/Image Zoom
ComfyUI Node

Image Zoom

Image Zoom

By Scorpiosis0·Created 10 months ago·Updated 2 months ago· 3
Image Zoom
  • image
  • IMAGE
zoom1.00
interpolationbilinear
translate_x0
translate_y0
bg_color
apply_type

Core ComfyUI can rescale an image all day, but it can't zoom into it. That's the gap Image Zoom fills: you keep the canvas size fixed and punch into the middle - or anywhere else, since you get X/Y translation too. If you've ever wanted to crop a face out of a group shot for an img2img close-up, or simulate a camera push-in across a batch, this is the node.

It does both directions, which is more useful than it sounds. zoom > 1 crops into the center of the image and upscales what's left to fill the original canvas - so it's a crop-and-upscale in one. zoom < 1 shrinks the image and centers it on the canvas, letterboxing with your chosen background color. That's the cheap way to "pull back" for composition testing without touching resolution math.

What you actually set

  • zoom - 0.1 to 5, default 1 (no change). 2 means "make the center twice as large," 0.5 means "shrink to half."
  • translate_x / translate_y - pixel offset of the crop window, ±4096. Positive values shift the view; combine with a fixed zoom to pan around, which is great for exploring a large render or nudging a subject into a target position before a sampler pass.
  • interpolation - area, nearest, bilinear, bicubic, lanczos. For zooming in (upsampling), lanczos and bicubic look best; for zooming out (downsampling), area avoids aliasing.
  • bg_color - black or white, the letterbox fill when zoom < 1 or when the pan runs off the edge.

Plus the pack-wide apply_type dropdown, and a single IMAGE output that keeps the same dimensions as the input - which is the whole point if the node downstream expects a fixed size.

A real workflow use

The classic img2img move: generate a wide image, run Image Zoom at ~1.8 on the face region with a small translate so the subject is centered, then send the result into a sampler at moderate denoise. You get a close-up that stays consistent with the original because it's a crop, not a fresh generation. Dial the translation over a few frames and you've got a poor-man's camera pan for animation or video work.

Install

It's part of WtlNodes, so the standard one-liner:

cd ComfyUI/custom_nodes
git clone https://github.com/Scorpiosis0/ComfyUI-WtlNodes.git

Restart ComfyUI. ComfyUI Manager users can search "WtlNodes". No models to download, no exotic dependencies - numpy, scipy, pillow at most.

Gotchas

  • zoom upscales; it doesn't add detail. Zooming to 2× is the same as resizing with lanczos - softness and upscale artifacts included. Pair it with a sampler pass or a real upscaler if the result feeds a large output.
  • Translation is in pixels, and it's an offset from center. If you're panning by a quarter of the frame, that's width / 4 in translate_x, not a percentage. Easy to overshoot.
  • apply_type matters here more than most places. Set it to none and you can scrub zoom and translate with a live preview before committing - genuinely handy for nailing a composition. Forget it's paused and you'll wonder why the workflow is waiting on you.
CategoryWtlNodes/image

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
zoomFLOAT1.000.1–5
interpolationCOMBObilinear5 options: area, nearest, bilinear, bicubic, lanczos
translate_xINT0-4096–4096
translate_yINT0-4096–4096
bg_colorCOMBO2 options: black, white
apply_typeCOMBO3 options: none, auto_apply, apply_all

Outputs (1)

NameTypeDescription
IMAGEIMAGE