- image
- IMAGE
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),lanczosandbicubiclook best; for zooming out (downsampling),areaavoids 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
zoomupscales; it doesn't add detail. Zooming to 2× is the same as resizing withlanczos- 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 / 4intranslate_x, not a percentage. Easy to overshoot. apply_typematters here more than most places. Set it tononeand you can scrubzoomandtranslatewith 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| zoom | FLOAT | 1.000.1–5 | — |
| interpolation | COMBO | bilinear | 5 options: area, nearest, bilinear, bicubic, lanczos |
| translate_x | INT | 0-4096–4096 | — |
| translate_y | INT | 0-4096–4096 | — |
| bg_color | COMBO | 2 options: black, white | |
| apply_type | COMBO | 3 options: none, auto_apply, apply_all |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |