Upscale_And_Original_Size
A digital zoom that keeps the canvas size
- image
- image
Zoom in on the center of an image without changing its dimensions. This node scales the image up by scale_by and then center-crops back down to the original size - so a scale_by of 2 gives you the middle of the image blown up to fill the same canvas, and everything at the edges is gone. It's a digital zoom / center-crop, and despite the "upscale" in the name, it is not a quality upscaler.
How it works
Convert to PIL, multiply the dimensions by scale_by (1–9.99), resize with nearest-neighbor interpolation, then crop the center original_width × original_height box out of the enlarged image. Nearest-neighbor means the zoomed-in result is blocky-pixelated rather than smoothly resampled - which is a deliberate choice for keeping it fast and "sharp," and also exactly why you shouldn't reach for this when you actually want more detail. The math is: scale_by = how many times the center is magnified, and the region outside the crop simply disappears.
Inputs and outputs
- scale_by - FLOAT, 1–9.99 (default 1, step 0.01). 1 = unchanged; 2 = 2x zoom into the center.
- image - IMAGE.
Output: image - same dimensions as the input, but showing a magnified central region.
When to use it (and when not to)
The honest use case is composition: you have a composition that's nearly right but the subject sits slightly too small, and you want to punch in without re-generating or re-framing. It's also a quick "inspect the middle" tool before committing to a heavier pipeline. What it is not is an upscaler - for actual detail recovery you want a real upscale pass (latent upscale + a second sampler, or a dedicated model), which the KB's upscaling material covers properly. Using this node to "upscale" a 512 image will just give you a pixelated 512 image of the middle. Keep it in the "crop and reframe" drawer, not the "enhance" one.
Standard pack note: this node was removed in the April 2025 rewrite, so a fresh install of the repo ships only the GPT4V captioner; the code lives in the old Load_Image_Batch.py in git history.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/438443467/ComfyUI-GPT4V-Image-Captioner
Restart ComfyUI. No models, no dependencies.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| scale_by | FLOAT | 1.001–9.99 | — |
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |