Nodes/WhiteRabbit/πŸ‡ Upscale w/ Model (Advanced)
ComfyUI Node

πŸ‡ Upscale w/ Model (Advanced)

The ESRGAN upscaler with the OOM dials you actually need

By Artificial-SweetenerΒ·Created about a year agoΒ·Updated about a month agoΒ· 82
πŸ‡ Upscale w/ Model (Advanced)
  • upscale_model
  • image
  • IMAGE
β—„max_batch_size0β–Ί
β—„tile_size0β–Ί
β—„channels_lastfalseβ–Ί
β—„precisionfp32β–Ί

ComfyUI's built-in "Upscale Image (using Model)" works, but it has a bad habit: when a big batch or big image hits an out-of-memory error, it falls back to progressively smaller tiles silently and slowly - 512, then 256, then 128 - and you sit there wondering why a 4Γ— upscale took twenty minutes. Upscale w/ Model (Advanced) is the author's personal edit of that node with the knobs exposed: batch size, tile size, memory layout, and precision. Defaults match the original, so it's a drop-in, but when things get slow you can actually do something about it.

The community's mental model (and the KB's) is worth keeping straight here: ESRGAN-family models do the "more pixels" job - they sharpen and enlarge, they do not invent new detail the way a generative upscaler like SeedVR2 does. That's not a flaw; for upscaling already-decent frames it's exactly what you want, and it's fast and deterministic. This node is the ESRGAN loader's nice wrapper.

How it works

It runs the selected upscale model (pick your ESRGAN, e.g. a 2Γ— or 4Γ— checkpoint) over the input batch, with four controls that exist because the native node hides them:

  • max_batch_size - process the batch in chunks of this size. 0 = all at once. This is the big one for video: upscaling 200 frames in one go pins VRAM; chunking keeps it steady and avoids the slow fallback entirely.
  • tile_size - your starting tile. 0 = auto (starts at 512, halves on OOM). The difference from the original: you get to set the starting point, so you can start at 1024 on a card that can take it, instead of being forced through the slow fallback ladder.
  • channels_last - memory layout. Try it ON for a speed boost on some GPUs; the tooltip's honest advice is "if you see no gain, leave it OFF."
  • precision - fp32 (safest), or fp16/bf16 for speed on many GPUs. Quality can shift slightly depending on the model, so check a frame or two before committing to a full render.

The inputs that matter

  • upscale_model - your ESRGAN checkpoint. Wire from an upscale-model loader.
  • image - the batch to upscale.
  • IMAGE (output) - the upscaled batch, same frame count, larger frames.

Installing it

WhiteRabbit pack, one-time install:

cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/comfyui-WhiteRabbit
cd comfyui-WhiteRabbit
python -m pip install -r requirements.txt

or ComfyUI Manager β†’ "WhiteRabbit". The only pip dependency is torchlanc; the pack targets ComfyUI's v3 node API, so keep ComfyUI current. Models live in the standard models/upscale_models/ folder you already use for ESRGAN.

Where people get burned

  • Treating it as a detail restorer. Feed it a soft, low-res source and it'll enlarge the softness. Pair it with Batch Resize w/ Lanczos to hit a specific target size (the pack's example workflow does exactly this), and reach for a generative restorer only if you genuinely need new detail.
  • Starting from auto tile and still timing out. If you know your card, set tile_size and max_batch_size explicitly instead of paying the auto-fallback tax every run.
  • fp16 on a model that doesn't like it. Some ESRGANs visibly shift color in low precision. Do a single-frame test before the full batch.

It's the "stop babysitting OOMs" node for upscaling, and for anyone doing batch video upscaling it's close to essential.

Categoryimage/upscaling

Inputs (6)

NameTypeDefaultDescription
upscale_modelUPSCALE_MODELPick your ESRGAN model (e.g. 2Γ— / 4Γ—).
imageIMAGEImages to upscale. Accepts a batch: framesΓ—HΓ—WΓ—C with values in [0–1].
max_batch_sizeoptINT00–4096How many images to process at once. 0 = all at once. Set >0 if you hit OOM.
tile_sizeoptINT00–2048How big each tile is. 0 = auto (starts at 512 and halves on OOM). Bigger is faster; smaller is safer.
channels_lastoptBOOLEANfalseTry this ON for a small speed boost on some GPUs. If you see no gain, leave it OFF.
precisionoptCOMBOfp32Math mode. fp32 = safest. fp16/bf16 can be faster on many GPUs, may impact image quality.

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”