Nodes/SAX Bridge/SAX Upscaler
ComfyUI Node

SAX Upscaler

Upscale without leaving the pipe — SAX Upscaler

By so16tm·Created 7 months ago·Updated 10 days ago· 1
SAX Upscaler
  • pipe
  • PIPE
  • IMAGE
◄upscale_model_name▾►
◄method▾►
◄scale_by2.00►
◄denoise0.00►
◄steps_override0►
◄cfg_override0.0►

SAX Upscaler does what the whole SAX_Bridge pack is about: one node, sitting in the pipe, that handles a step you'd normally wire by hand. It upscales the image inside the pipe - using an ESRGAN model if you give it one, plain pixel interpolation if you don't - and can follow up with a lightweight img2img pass to put texture back. Because it operates on the pipe, it slots between SAX KSampler and SAX Detailer with a single wire.

The KB's upscaling doc draws the line that matters here: ESRGAN-family models are "more pixels, source already sharp" tools - non-generative, fast, can't invent anything. That's what upscale_model_name gives you. The generative part, the bit that adds detail the interpolator can't, comes from the img2img pass. This node is the rare one that does both in a single trip.

How it works

You pick a scale_by multiplier (default 2×, range 0.25–8). The target size is computed from the original resolution and aligned to 8 pixels, which matters because the latent VAE operates on 8×8 blocks - off-alignment sizes cause weird seams downstream. Then:

  • If upscale_model_name is set, the ESRGAN model upscales first, and any method is used only to adjust to the final target size (a 4x model with scale_by=2 upscales 4x then downscales to half).
  • If it's None, the method (lanczos / bilinear / bicubic / nearest-exact) does the whole job - pure pixel interpolation.
  • If denoise > 0, it runs a KSampler img2img pass on the upscaled image to restore texture and kill the "smeared plastic" look. steps_override and cfg_override control that pass; 0 means inherit from the loader's settings.

A nice safety detail: if the pipe has no negative conditioning, the node auto-generates an empty one before the img2img pass, so it doesn't crash on bare pipes.

The inputs that matter

  • pipe - the pipe whose images get upscaled.
  • upscale_model_name - None for pixel interpolation, or any model in your upscale_models folder (4x-UltraSharp and RealESRGAN variants are the usual suspects).
  • scale_by - the multiplier; the one knob you'll tune most.
  • denoise - 0 = upscale only; 0.2–0.4 is the classic range for a texture-restoring pass.
  • steps_override / cfg_override - only affect the img2img pass; leave at 0 to inherit.

The outputs are PIPE (with images replaced) and IMAGE (the upscaled tensor directly). The IMAGE output is handy for previewing the upscale in isolation before it flows on.

Installing it

It ships in the SAX_Bridge pack. ComfyUI Manager → "Install via Git URL" → https://github.com/so16tm/SAX_Bridge, or:

cd ComfyUI/custom_nodes
git clone https://github.com/so16tm/SAX_Bridge

Restart. No required dependencies - but for the model-based path you'll want an ESRGAN model (say, 4x-UltraSharp) in your ComfyUI/models/upscale_models/ folder.

Gotchas

If the pipe has no images yet (e.g. you wired it before any VAE decode happened), the node raises a clear error telling you to run Loader → KSampler → VAEDecode first - read that message before hunting for a bug. And remember the two-stage reality: pixel interpolation is free but adds no detail, so at denoise=0 an ESRGAN-less upscale is just a bigger blurrier image. The img2img pass is where the quality lives, and it costs time - which is exactly why the pack lets you leave it off while iterating and switch it on for finals.

CategorySAX/Bridge/Enhance

Inputs (7)

NameTypeDefaultDescription
pipePIPE_LINE—
upscale_model_nameCOMBOUpscale model to use. None = pixel interpolation only.
methodCOMBOPixel interpolation method. When upscale_model_name is set, model-based upscaling takes priority; this method is used only for final resize adjustment.
scale_byFLOAT2.000.25–8Scale factor relative to original resolution. For a 4x ESRGAN model, scale_by=2 upscales 4x then downscales to 1/2.
denoiseFLOAT0.000–10=upscale only / Values > 0 run a lightweight img2img pass after upscaling.
steps_overrideINT00–200Steps for img2img pass. 0 = inherit from loader_settings.
cfg_overrideFLOAT0.00–100CFG for img2img pass. 0.0 = inherit from loader_settings. Values > 0 override it.

Outputs (2)

NameTypeDescription
PIPEPIPE_LINE—
IMAGEIMAGE—