Nodes/ComfyUI-YarvixPA/πŸš€ Upscale Image with Model
ComfyUI Node

πŸš€ Upscale Image with Model

Model upscaling with sane tiling defaults

By YarvixPAΒ·Created about a year agoΒ·Updated 6 months agoΒ· 14
πŸš€ Upscale Image with Model
  • image
  • IMAGE
β—„model_nameβ–Ύβ–Ί
β—„upscale_by2.00β–Ί
β—„tile_size512β–Ί

Upscaling in ComfyUI is normally a two-node affair - a model loader plus an upscale node - and neither one tiles well on a small card, so the whole thing goes OOM on a 2K image. This node fuses load + upscale + tiling into one, and it's the tiling that makes it interesting: it runs the model in overlapping tiles and, if it hits an out-of-memory, it halves the tile size and retries until it fits. That's the kind of self-healing behavior that turns a frustrating step into a set-and-forget one.

Before you use it, know which of the three upscaling jobs you actually have (the community mixes them up constantly): this node handles the more pixels job - ESRGAN-family single-image models like 4x-UltraSharp or Remacri that sharpen and enlarge without inventing content. It is not SUPIR or SeedVR2, which restore detail and will happily rewrite faces. Different tools.

How it works

It loads whatever model you pick from your upscale_models folder using spandrel - the same loader core ComfyUI uses - and runs it through tiled_scale with a 32px overlap so tile seams don't show. Then it reconciles the result to your upscale_by target: if you asked for 2x but the model is a 4x model, it runs the 4x pass and lanczos-downscales to exactly 2x; if you asked for more than the model's native scale, it upscales the result to match. So upscale_by is the knob you set, whatever the model's native scale is.

The OOM loop is the standout detail: a failed pass halves tile_size (down to a floor of 128) and retries, so the node degrades gracefully instead of crashing your queue.

Inputs

  • model_name - from your upscale_models folder (same list as core's model loader).
  • upscale_by - target factor, 0.01–8.0, default 2.0.
  • image - the source.
  • tile_size - tile edge, default 512. Lower it preemptively if you know you're on a tight card.

Output is a single IMAGE.

Install

ComfyUI Manager (search "YarvixPA") or

cd ComfyUI/custom_nodes
git clone https://github.com/YarvixPA/ComfyUI-YarvixPA

restart. It lives under ComfyUI-YarvixPA/Image/Upscale. spandrel comes with ComfyUI core, so no extra dependency beyond the pack's own requirements.

Two things to know

First, the model picker only lists what's in your upscale_models folder - nothing is downloaded for you. Second, there's a silent cap on what models load: the node tries to register spandrel's extra architectures via spandrel_extra_arches, but that package usually isn't installed, so some non-commercial model families simply won't load. If a model loads fine in core's loader but this node throws a "must be a single-image model" style error, that's usually the spandrel_extra_arches gap, not a broken node. For the common 4x ESRGAN models, it just works.

CategoryComfyUI-YarvixPA/Image/Upscale

Inputs (4)

NameTypeDefaultDescription
model_nameCOMBO0 options:
upscale_byFLOAT2.000.01–8β€”
imageIMAGEβ€”
tile_sizeINT512128–8192β€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”