Nodes/ComfyUI_agilly1989_motorway/ImageUpscaleWithModel_motorway_edition
ComfyUI Node

ImageUpscaleWithModel_motorway_edition

Run your ESRGAN upscaler from inside the pipe

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ImageUpscaleWithModel_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_upscale_model_keyupscale_model
INPUT_image_keyimage
OUTPUT_IMAGE_keyIMAGE

ImageUpscaleWithModel_motorway_edition wraps the core node that runs a loaded upscaler model - your 4x-UltraSharp, Remacri, Real-ESRGAN, whatever you've dropped into models/upscale_models - over an image. The motorway twist: the upscale model and the image both come out of the pipe by key name, and the upscaled image goes back into the pipe, instead of flowing through two sockets and one cable.

What the underlying node actually does

The core ImageUpscaleWithModel is the "more pixels" tier of upscaling, not the "invent new detail" tier. Given an upscaler model and an image, it runs the model forward and returns a larger version of the same image. No hallucination, no restoration, no texturing - the KB is blunt that this tier "adds no content, cannot hallucinate, runs in milliseconds" relative to the generative upscalers. ESRGAN-family models are the workhorses here: 4x-UltraSharp for general use, anime-specific variants if that's your lane. If you want to restore a mangled image or add coherent new detail, you want a generative pass (img2img at low denoise, or a SUPIR-style model), not this node.

So the sensible place for it is the end of the line: VAE-decode, then upscale for output size, or upscale as an intermediate and feed the bigger image back into an img2img refinement pass. Nothing about the motorway wrapper changes that math - it's purely plumbing.

The motorway-specific fields

Three key fields, all of them text:

  • INPUT_upscale_model_key (default "upscale_model") - where the loaded upscaler model lives in the pipe.
  • INPUT_image_key (default "image") - the image to upscale.
  • OUTPUT_IMAGE_key (default "IMAGE") - where the upscaled result is stored.

The node returns only the MOTORWAY 🚌💨. To actually see or save the result, read the IMAGE key out with a Motorway AxB ramp and feed it into a normal SaveImage (or a preview). That's a pattern you'll see in every article about this pack: motorway-ed nodes never hand you a direct socket output, they write a key, and ramps are how you get values back out.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart ComfyUI, or install via ComfyUI Manager. The pack pulls in no extra pip packages and downloads no models - the upscaler weights are yours, loaded the normal way (e.g. UpscaleModelLoader) and handed to this node through a motorway key. If you don't have an upscale model installed, the node will error the first time it tries to look one up in the pipe.

Real talk on the wrapper

This is a small node that only earns its keep if you're building a motorway workflow. Two pack-wide caveats apply. First, the repo is in active development and currently mid-refactor - the README warns things break, and the present HEAD has the _motorway_edition registration commented out, so on a fresh clone these nodes may not appear in your menu at all. If you hit that, it's the pack, not you. Second, the standard motorway failure mode is 'MotorwayClass' object has no attribute 'hash_', which means a key you set - say INPUT_image_key pointing at "image" - was never actually written to the pipe upstream. Key strings are exact and case-sensitive; a typo turns a silent no-op into that exception. Given the pack's state, if all you need is "upscale my final image," the stock node is the calmer choice. This one is for when you've already committed to the pipe.

Categoryagilly1989 Nodes/Motorway-ed/image/upscaling

Inputs (4)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_upscale_model_keySTRINGupscale_model
INPUT_image_keySTRINGimage
OUTPUT_IMAGE_keySTRINGIMAGE

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨