Nodes/ComfyUI_agilly1989_motorway/PatchModelAddDownscale_motorway_edition
ComfyUI Node

PatchModelAddDownscale_motorway_edition

Low-VRAM model patching by key

By agilly1989·Created 2 years ago·Updated about a year ago· 7
PatchModelAddDownscale_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_model_keymodel
block_number3
downscale_factor2.000
start_percent0.000
end_percent0.350
downscale_after_skiptrue
downscale_method
upscale_method
OUTPUT_MODEL_keyMODEL

PatchModelAddDownscale_motorway_edition is the motorway-edition version of ComfyUI's VRAM-saving model patch: it patches the model in your Motorway to downscale its internal activations during part of sampling, then writes the patched model back by key. It's the "I'm almost fitting this but not quite" node, adapted to life on the pipe.

The schema is the core PatchModelAddDownscale API as key fields plus widgets. INPUT_model_key (default model) says which key holds the model to patch; OUTPUT_MODEL_key (default MODEL, uppercase - note the difference) is where the patched model lands. The widgets are where the real tuning happens: block_number (int, default 3, range 1–32) picks which transformer block gets patched; downscale_factor (float, default 2) says how much to shrink activations; start_percent (0) and end_percent (0.35) bound the portion of sampling where the patch is active; downscale_after_skip (boolean, default true) controls whether downscaling happens after the skip connection; and downscale_method / upscale_method (both enums: bicubic, nearest-exact, bilinear, area, bislerp) choose the resampling methods for shrinking and restoring.

What it does, plainly: during the first ~35% of sampling (by default), inside block 3, the model's internal feature maps are downscaled by 2x and upscaled back before the block finishes. That trades a bit of detail for a meaningful drop in activation memory - which is why this node shows up in low-VRAM FLUX and other big-model workflows. You lose some fidelity in the early, expensive part of the diffusion trajectory to keep the whole thing on one GPU. It's a "help me fit" patch, not a quality feature: if you're not VRAM-bound, you don't want it.

Everything "edition" about it follows the pack's clone pattern: read the model from the bag by key, apply the patch, write it back under the output key, clone the bag, hand it on. In a Motorway graph this lets you patch the model without dragging a MODEL wire across the canvas - store it at the loader, patch it here, and let the sampler read the patched MODEL key downstream.

And the caveat that applies to every node with this suffix: the current release of the pack doesn't register the motorway-edition nodes. The clone module is commented out in __init__.py, and the release notes describe it as a hotfix that removed the node-cloning. Current installs won't show this node; you'd only see it in old workflows or old pack versions. If you installed the latest pack and can't find it, that's expected behavior, not a broken install.

If you do run it: keys are exact and case-sensitive - the output key defaulting to uppercase MODEL while the input reads lowercase model is a real asymmetry, so double-check both fields or you'll hit 'MotorwayClass' object has no attribute 'hash_'.

Install is the pack standard:

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

restart ComfyUI, or ComfyUI Manager → "agilly1989". The underlying downscale patch is a legitimately useful VRAM trick; the motorway-edition wrapper is beta-ware that's currently switched off. If you want the patch today, grab the stock PatchModelAddDownscale from core - same dials, no pipe required.

Categoryagilly1989 Nodes/Motorway-ed/model_patches/unet

Inputs (10)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_model_keySTRINGmodel
block_numberINT31–32
downscale_factorFLOAT2.0000.1–9
start_percentFLOAT0.0000–1
end_percentFLOAT0.3500–1
downscale_after_skipBOOLEANtrue
downscale_methodCOMBO5 options: bicubic, nearest-exact, bilinear, area, bislerp
upscale_methodCOMBO5 options: bicubic, nearest-exact, bilinear, area, bislerp
OUTPUT_MODEL_keySTRINGMODEL

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨