Nodes/ComfyUI_agilly1989_motorway/CFGGuider_motorway_edition
ComfyUI Node

CFGGuider_motorway_edition

Classic prompt guidance, keyed and negatived

By agilly1989·Created 2 years ago·Updated about a year ago· 7
CFGGuider_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_model_keymodel
INPUT_positive_keypositive
INPUT_negative_keynegative
cfg8.0
OUTPUT_GUIDER_keyGUIDER

CFGGuider is what classic classifier-free guidance looks like as a node: positive prompt, negative prompt, CFG scale, and the model - the whole familiar KSampler formula, split out so you can build sampling by hand. This _motorway_edition is the version that plugs into agilly1989's Motorway pipe, where those inputs come out of the Motorway by key name instead of by wire.

If you're on SD1.5 or SDXL, this is the guider you want. If you're on a guidance-distilled model - the Flux/Z-Image/Klein crowd - you want its plain sibling BasicGuider instead, and this node is a trap. More on that below.

How it works

The wrapper reads three things out of the Motorway and writes one back:

  • INPUT_model_key - key for the model (default model)
  • INPUT_positive_key - your positive conditioning (default positive)
  • INPUT_negative_key - your negative conditioning (default negative)
  • cfg - the guidance scale, a plain widget, default 8.0, range 0–100.
  • OUTPUT_GUIDER_key - where the built guider goes (default GUIDER)

Under the hood it instantiates the real core CFGGuider, feeds it the model and both conditionings pulled from those keys plus your cfg value, stores the result under the output key, and returns the Motorway. The only canvas output is the Motorway itself; a SamplerCustom downstream reads the GUIDER key to actually sample.

The CFG dial

The cfg default of 8 sits at the top of the SD1.5/SDXL sweet spot - the community band is roughly 4–9, with the classic warning that anything above ~12 starts burning colors and faces, and that "image ruined at the end" is often "too much CFG for the step count." For SD1.5/SDXL that's the whole story. For guidance-distilled models it inverts: CFG 1 is the default because guidance is already baked into the weights, and running CFG 7 applies the correction twice at double the render time. The negative prompt is also dead weight at CFG 1 - there's no unconditional pass for it to steer. So if your workflow is Flux-based, skip this node and use BasicGuider.

Motorway specifics

MOTORWAY 🚌💨 is required, and the defaults assume your chain wrote the model under model, positives under positive, negatives under negative. Rename keys upstream and you must rename them here too - a missing key throws the pack's signature 'MotorwayClass' object has no attribute 'hash_' error, which just means you asked for a key nobody has written yet. Keys overwrite as they flow down the chain, so don't stash two different conditionings under the same name.

Install

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

Restart, or search "ComfyUI_agilly1989_motorway" in ComfyUI Manager. No pip deps, no model downloads.

Fine print

This is an active-development beta pack - README opens with "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION" - and the current hotfix release has the _motorway_edition clone generation commented out of __init__.py, so on the newest main these nodes may not register at all. Workflow references them and they're missing? That's the why. Open a GitHub issue; the author has said Discord DMs get ignored.

Categoryagilly1989 Nodes/Motorway-ed/sampling/custom_sampling/guiders

Inputs (6)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_model_keySTRINGmodel
INPUT_positive_keySTRINGpositive
INPUT_negative_keySTRINGnegative
cfgFLOAT8.00–100
OUTPUT_GUIDER_keySTRINGGUIDER

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨