Upscale by Factor (With Model)
Upscale by Factor (With Model) — exact-size upscaling without the rounding fight
- upscale_model
- image
- image
Upscale models are stubborn about sizes. A 4x ESRGAN model takes your image and makes it four times bigger - period. So when you want exactly 2.5x, or 3x on a model that only does 2x, you're stuck doing the math yourself: run the model, then resize to the size you actually wanted, with the "right" resize method being a judgment call. This vsLinx node does that two-step for you and collapses it into one input: factor. Set 2.5, get 2.5x.
How it works
The mechanism is exactly what you'd do by hand, wrapped up: it runs your selected upscale model at its native scale (the fixed 2x or 4x the model was trained for), then applies a final resize to match the factor you asked for. The second resize is where the upscale_method choice lives - nearest-exact, bilinear, area, or lanczos. Factor is a float from 0.1 to 8.0, and yes, values below 1.0 will downscale - so it doubles as a precise resize node if you need one.
Choosing the resize method
This is the one real decision in the node, and it's the same choice you'd make in any upscale pipeline:
nearest-exact- hard pixels, no blending. Wrong for photos, right for pixel art you want to keep crunchy.bilinear- smooth, the safe default for general resizing.area- good for downscaling; it averages pixel areas instead of sampling.lanczos- the sharpest and highest-quality, but it runs on the CPU via PIL, so it's the slow option. Worth it when detail matters.
Inputs and outputs
upscale_model(UPSCALE_MODEL) - a model frommodels/upscale_models(4x-UltraSharp, RealESRGAN anime variants, Remacri, etc.).image(IMAGE) - the input.upscale_method- one of the four above.factor(default 2.0, 0.1–8.0) - the exact scale you want.
Output: a single image.
When to reach for it
Any time your target is "this image, this many times bigger" and your model's native scale doesn't match. The classic case is a 2x model when you want 3x, or a 4x model when you want 1.8x for a web thumbnail. It also keeps workflows tidy: one node, one factor dial, rather than an upscale-model node plus a separate Resize Image node and the mental arithmetic about intermediate dimensions.
Install
Part of the vsLinx pack. ComfyUI Manager → search "ComfyUI vsLinx Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/vslinx/ComfyUI-vslinx-nodes.git comfyui-vslinx-nodes
Restart, look under vsLinx/image. No extra dependencies; you'll want an upscale model in ComfyUI/models/upscale_models (4x-UltraSharp is the usual starter).
The honest take
It's a small node with a real but narrow job. If your upsizes are always "model native scale", the built-in Upscale Image (using Model) does the same thing with less ceremony and you don't need this. Where it wins is exact-factor control without a graph of glue nodes - and the lanczos option, added in v1.10.0, is the quality pick if you can spare the CPU time. Keep the resize method in mind: after a model upscale you're downscaling (or upscaling slightly) with the second pass, so bilinear or lanczos is almost always right; nearest-exact is the trap you'll only want for pixel-art.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| upscale_model | UPSCALE_MODEL | — | |
| image | IMAGE | — | |
| upscale_method | COMBO | 4 options: nearest-exact, bilinear, area, lanczos | |
| factor | FLOAT | 2.00.1–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |