Nodes/ComfyUI AstroCorp Nodes/Upscale Image (using Model)
ComfyUI Node

Upscale Image (using Model)

Upscale Image (using Model), minus the part where ONNX models break it

By AstroCorpΒ·Created about a year agoΒ·Updated 8 days agoΒ· 1
Upscale Image (using Model)
  • upscale_model
  • image
  • IMAGE

If you've ever run ComfyUI's "Upscale Image (using Model)" node, you've used this node - it's a faithful reimplementation. So why install a clone? Because the original silently can't handle the one thing the rest of this pack is built around: upscale models loaded from ONNX files. The stock upscale node expects a Spandrel model and chokes on the TensorRT/onnxruntime-backed model objects this pack's Load Upscale Model+ produces. This node knows how to run both.

In practice you use it as a pair: Load Upscale Model+ β†’ Upscale Image (using Model) β†’ Save Image. Load a .pth ESRGAN model and the behavior is indistinguishable from stock. Load a .onnx from OpenModelDB and the pair just... works, where stock would have errored.

How it works

Same engine facts as the native node, which is good because they're the right ones. The image goes through the same tiled upscaling (comfy.utils.tiled_scale) that stock uses, so big images are processed in 512px tiles with 32px of overlap and blended back together. That's the trick that keeps a 4K upscale on a mid-range card instead of blowing the VRAM budget.

There are two genuinely nice touches under the hood. First, the tiling loop halves the tile size on out-of-memory errors down to a floor of 128px - so a tight-VRAM machine degrades gracefully instead of hard-failing. Second, for ONNX models it reads the engine's own max tile dimension and caps tiles at that, which is why a TensorRT-compiled upscaler doesn't try to feed the engine a shape it was never built for.

The only inputs are upscale_model (the UPSCALE_MODEL from a loader) and image (the IMAGE you want bigger). One IMAGE comes out, ready for a Save Image node or anything else downstream. There's nothing to tune, which is the point: upscaling is one of the few places in ComfyUI where zero knobs is a feature.

Where it sits in an upscaling workflow

Worth being clear about what this node is not. This is a pixel upscaler - it makes the image larger without inventing detail. If your source is sharp and you just need more pixels for a print, a 4x ESRGAN model here is the correct, instant, hallucination-free answer. If your source is soft or damaged and you want the model to rebuild detail, that's a different job (SeedVR2 / SUPIR territory) and no pixel upscaler will do it. Half the upscaling arguments in the community are people mixing those two jobs up; knowing which one you're doing saves you an hour.

Installing and dependencies

Same as the rest of the pack - it ships together, so you install the pack once:

# ComfyUI Manager β†’ search "ComfyUI AstroCorp Nodes"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/AstroCorp/ComfyUI-AstroCorp-Nodes
# restart ComfyUI

The pack's requirements.txt lists only tensorrt (optional - the code guards for its absence). For ONNX models without TensorRT, install onnxruntime-gpu into the ComfyUI Python environment as the README suggests. No model files are bundled; you supply your own from models/upscale_models.

Common issues

  • "node types not found" when loading a shared workflow. The pack isn't installed, or ComfyUI wasn't restarted after cloning. This applies to every node in the pack.
  • OOM on a huge image. The node auto-halves tile size down to 128px before giving up, so a real out-of-memory on a genuinely enormous upscale is the failure you'd actually see. If you hit it, drop the input resolution first - there's no detail in a 6K source to preserve on a 6GB card anyway.
  • Output looks soft. Check your model, not the node - the tiling and overlap are sane defaults. A "clean" upscaler shouldn't soften; a badly chosen one will.

The stock node works fine for stock models. The moment you bring an ONNX upscaler into ComfyUI, this is the version you want.

CategoryπŸš€πŸŒ AstroCorp πŸŒπŸš€/upscaling

Inputs (2)

NameTypeDefaultDescription
upscale_modelUPSCALE_MODELβ€”
imageIMAGEβ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”