Nodes/Best Resolution/Upscale Image By (with Model)
ComfyUI Node

Upscale Image By (with Model)

The ComfyUI upscaler that actually hits your target factor

By Lex-DRL·Created about a year ago·Updated 5 months ago· 15
Upscale Image By (with Model)
  • upscale_model
  • image
  • image
model_scale2.00
scale_methodbicubic
scale1.50
show_statusfalse

ComfyUI gives you two upscaling tools, and they both annoy you in a specific way. Upscale Image (using Model) runs an ESRGAN-style model - great detail, but only at whatever factor the model was trained for (usually 2x or 4x). Upscale Image By lets you pick any factor, but it's plain interpolation. This node is the "why not both?" answer: run the model, then downscale to the factor you actually asked for. It's also the only node in the Best Resolution pack that touches actual pixels. Every other node in the pack is pure math; this one does real work.

How it works

The mechanism is in the name. Give it an upscale model and it upscales by the model's native factor, then rescales the result with your chosen scale_method so the final output is exactly scale times the input. Want 1.5x from a 4x model? It runs the model, then bicubic-downscales 4x back down to 1.5x. That sounds wasteful and kind of is, but the result is crisper than a plain 1.5x interpolation - the model's detail survives the trip down.

Two shortcuts keep it from being silly:

  • If scale is around 0.5 or below, the model isn't run at all - it's just a resize.
  • If scale equals model_scale exactly, the second resize is skipped entirely.

The author ships a status display that tells you exactly what happened (turn on show_status): "x1.500 = x4.000 → x0.375" and so on.

The sweet spot, and where people get burned

For a 4x model, this is the real behavior:

| scale | Result | |---|---| | under 0.5 | model skipped entirely - why use this node? | | 0.5 – 1.0 | downscale-only, crisp | | 1.0 – 3.5 | the range this node exists for | | 3.5 – 4.0 | getting blurry, still better than plain upscale | | above 4.0 | very blurry |

So the rule of thumb: keep your target between 1.0 and model_scale - 0.5. For a 2x model that's 1.0–1.5. The node won't stop you from going past it - it just warns you if show_status is on. The most common mistake is leaving model_scale at the default 2 when your model is actually a 4x model, which makes the math silently wrong. Set it to your model's native factor (the model card or filename usually says).

The inputs that matter

  • upscale_model - wire in an UPSCALE_MODEL from an Upscale Model Loader (e.g., 4x-UltraSharp, RealESRGAN). This is the only input that costs you anything; the pack ships no models.
  • image - your IMAGE tensor.
  • model_scale - native upscale factor of that model.
  • scale - the factor you actually want.
  • scale_method - resampling for the second (down)scale; bicubic is a fine default.
  • show_status - print the upscale math on the node face. Worth turning on while you learn.

Output is a single image, which you can save, VAE-encode for a second sampling pass, or feed into tiled upscaling.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-BestResolution

…or just search "Best Resolution" in ComfyUI Manager and hit install, then restart ComfyUI. The only dependency is frozendict, which Manager pulls in automatically. There are no model files to download for the pack itself.

One honest caveat: this node shines for pixel-space upscaling. If you're doing a latent-space hi-res fix, you don't want it - that's where the pack's Best-Res (area+scale) node and a latent upscale come in. Different job, different tool.

CategoryBest Resolution

Inputs (6)

NameTypeDefaultDescription
upscale_modelUPSCALE_MODEL
imageIMAGE
model_scaleFLOAT2.00The upscale factor a model natively increases image by
scale_methodCOMBObicubic5 options: nearest-exact, bilinear, area, bicubic, lanczos
scaleFLOAT1.50The actual factor you want to upscale by
show_statusBOOLEANfalseShow the extracted string on the node itself?

Outputs (1)

NameTypeDescription
imageIMAGE