Nodes/ComfyUI_agilly1989_motorway/RenormCFG_motorway_edition
ComfyUI Node

RenormCFG_motorway_edition

RenormCFG from the bus — cap the CFG, keep the shape

By agilly1989·Created 2 years ago·Updated about a year ago· 7
RenormCFG_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_model_keymodel
cfg_trunc100.00
renorm_cfg1.00
OUTPUT_MODEL_keyMODEL

CFG has a nasty habit: crank it high enough to get a compliant image and you start paying for it in blown-out colors and over-baked contrast. RenormCFG is one of ComfyUI's power-user model patches that tries to have it both ways. It does two things to the CFG update at each step - it truncates the update so it never exceeds a ceiling (cfg_trunc), and then renormalizes what's left back up to the magnitude the original CFG would have produced (renorm_cfg).

Read that again, because it's the whole trick. Truncating the direction keeps the update from going off the rails; renormalizing the length keeps it from being too weak. The net effect is you can run an aggressive CFG and let the patch keep the per-step update from overshooting, without simply weakening your prompt adherence. It's a fiddly node - this is squarely "advanced model" territory, alongside RescaleCFG and friends - and you tune it when ordinary CFG is either burning your image or not steering hard enough.

On the bus

The _motorway_edition clone reads its model from the MOTORWAY 🚌💨 bus by key:

  • INPUT_model_key (default model) - the bus key holding the checkpoint.
  • cfg_trunc (default 100) - the ceiling. At 100 it's effectively off. Lower it toward the CFG you'd actually want to run, and steps are capped there.
  • renorm_cfg (default 1) - how much of the original magnitude to restore. 1 keeps full strength; below 1 softens the whole update.
  • OUTPUT_MODEL_key (default MODEL) - where the patched model is written back onto the bus.

The only return is the bus; the patched model rides inside under MODEL. Whatever sampler comes next has to read that key rather than the original model, and yes - the default case mismatch between MODEL and model is a classic silent-miss point. Keys are case-sensitive and shared by name.

Install

No dependencies, no model downloads:

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

or ComfyUI Manager → search ComfyUI_agilly1989_motorway → install → restart.

The fine print

Two things. This pack is a self-described beta - "IF THINGS BREAK ITS BECAUSE I BROKE IT" is the README's own framing - and the _motorway_edition clones were generated by an auto-cloner that the 1.1.7 build disabled, so a fresh install may not include this node. The stock RenormCFG in core does the same job, no bus required.

The bus error is the usual KeyError: 'hash_...' doesn't exist in motorway - the key you referenced was never stored upstream. Check your ramps before touching the patch settings.

And be honest about what you're tuning: patches like this are last-resort knobs for CFG pathologies. On SD 1.5/SDXL high-CFG burning, RescaleCFG is the more common first stop; Renorm's truncate-then-restore is for when you've already tried the simpler dials and the image is still fighting you.

Categoryagilly1989 Nodes/Motorway-ed/advanced/model

Inputs (5)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_model_keySTRINGmodel
cfg_truncFLOAT100.000–100
renorm_cfgFLOAT1.000–100
OUTPUT_MODEL_keySTRINGMODEL

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨