Auto Scale Image
It's Not an Upscaler. It's the Resize That Keeps Your Aspect Ratio Honest
- image
- IMAGE
The name is a lie, sort of. Auto Scale Image isn't an upscaler in the way you're probably thinking - it won't invent detail, it won't make a soft photo crisp, and it needs no model files at all. What it does is more boring and more useful: you give it a target width, it resizes the image to that width and computes the height from the aspect ratio, snapped to the nearest multiple of 16. That's the whole job, and if you've ever sat there hand-calculating resolutions so a batch of images didn't come out looking like a funhouse mirror, you already know why it exists.
The author knows it's a small thing. The README is one line and a shrug: "I'm sure there are many nodes like it, but this one is mine." True on both counts - there are a dozen resolution-snapping nodes floating around custom node land. What this one gets right is that it's honest about it: zero dependencies, nothing to download, pure ComfyUI core under the hood.
What it actually does
Under the hood it's a thin wrapper around comfy.utils.common_upscale - the same function the built-in ImageScale node calls. The mechanism is easy to read in the source:
- it measures the input's height-to-width ratio,
- computes
height = round(aspect_ratio * width / 16) * 16, - resizes both dimensions with your chosen interpolation method.
So you pick the width and it picks the height. The README says it "scales the height," which undersells it a little - it's a full resize, the height just happens to be the one doing the math.
Why 16? ComfyUI's VAE downsamples by 8x, so anything feeding latent-space operations wants dimensions divisible by 8 - and any multiple of 16 is a multiple of 8, which makes the output always latent-safe. That's the entire trick, and it's the same arithmetic behind most of the "divisible by N" nodes you'll find tucked into shared workflows. Strictly speaking, SDXL and Flux prefer multiples of 64 to stay perfectly in-distribution, but when you're resizing an existing image rather than generating fresh, it rarely matters - and you can type any width you like; only the height gets snapped.
The inputs that matter
- width - the one you actually set. Default 512, range 64–4096. The UI steps by 16 but accepts any number; the height is what gets rounded.
- upscale_method -
nearest-exact,bilinear,area,bicubic, orlanczos. The default is nearest-exact, and that's the one trap here: it's right for pixel art, but if you're blowing a 512-wide image up to 1024, switch to bicubic or lanczos or you'll get jaggies.areais the honest choice when you're shrinking.
The single output is an IMAGE, and it drops straight into anything that wants consistent dimensions: a VAEEncode ahead of img2img, a video model's input so every frame matches, or a Compare node when you're A/B-testing.
Installing it
ComfyUI Manager → search "comfyui-auto-scale-image" (or "Auto Scale Image") → install → restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/neph1/comfyui-auto-scale-image
Then restart ComfyUI. No requirements.txt, no weights, no model downloads - this is as close to zero-friction as a custom node gets.
Where it fits, and where it doesn't
On the upscaling ladder, this sits on the "more pixels" rung, not the "more detail" rung: it interpolates, it can't hallucinate, and it's exactly the safe resize you want before a real upscale pass like SeedVR2 or an ESRGAN model. The thing that actually burns people is that it's pixel-space (IMAGE in, IMAGE out) - it can't sit between the VAE and the sampler. If your graph starts complaining that it got an IMAGE where a latent was expected, you've wired it in front of a latent input; that's a LatentUpscale's job.
It's a small node that does one small thing without drama. Sometimes that's exactly the node you want.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| upscale_method | COMBO | 5 options: nearest-exact, bilinear, area, bicubic, lanczos | |
| width | INT | 51264–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |