DualCFGGuider_motorway_edition
DualCFGGuider for fancier CFG on the Motorway
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Normal CFG pulls the image away from one negative conditioning. DualCFGGuider pulls it away from two positives, blended. It's the custom-sampling node you reach for when one prompt isn't enough - you want the composition of prompt A and the style of prompt B, with separate knobs deciding how hard each one pulls. Think "dual prompt guidance," which is literally how ComfyUI's own search aliases describe it.
This is the Motorway-ed version, so instead of accepting a model, cond1, cond2, and negative cable, it reads each of those off the pipe using a string key and writes its guider back onto the pipe.
What the inputs mean
Two of the inputs are the CFG weights, and they're the ones that matter:
- cfg_conds (float, default 8.0) - the overall CFG scale, i.e. how strongly the positive pass is guided away from the negative. This is your familiar CFG number: 5–9 for SD 1.5/SDXL, near 1 for guidance-distilled models (CFG 1 is the modern default on Flux-derivatives and distills, because the guidance is baked into the weights).
- cfg_cond2_negative (float, default 8.0) - how strongly cond2's negative contrast applies. Cranking this up pushes harder on the second conditioning's own interpretation.
The key inputs are all INPUT_<name>_key strings naming where on the Motorway the node finds each value: INPUT_model_key (default model), INPUT_cond1_key (default cond1), INPUT_cond2_key (default cond2), INPUT_negative_key (default negative). Whatever keys you stored those under earlier in the flow - with a ramp, a MotorwaySeed, or another motorway-ed node - are the keys you type in here. The guider it builds is stored under OUTPUT_GUIDER_key (default GUIDER).
How it works
The wrapped core node constructs a Guider_DualCFG: it takes cond1 and cond2, computes their interpolation under cfg_conds, then applies the negative pull scaled by cfg_cond2_negative. The result is a guider object you hand to a custom sampler (e.g. SamplerCustomAdvanced) which runs the denoise loop with it. On the Motorway you'd point a motorway-ed sampler's INPUT_guider_key at GUIDER and let the pipe do the rest.
Two things trip people up. First, this is a guider, not a sampler - it doesn't do the denoising, it only decides the guidance math each step. Second, the two-conditioning dance is real CFG, so it runs the model an extra pass and costs roughly double a plain guidance-distilled run. On a distilled model you usually want this off the table entirely.
Install
Same as every node in this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or find it under "ComfyUI_agilly1989_motorway" in ComfyUI Manager. No extra dependencies, no models to download.
Honest warning before you go digging: as of pack v1.1.7 the author's own pyproject.toml calls the release a "HOTFIX - REMOVED MONKEYPATCH AND GENERATED NODES," and __init__.py ships with the clone-node registration commented out. The core Motorway nodes work; the motorway-ed clones like this one may not be in your menu until the author re-enables them. If they do show up, note that this guider has no widget for model - it's read off the bus like everything else, so a missing model key gives you a hash lookup error straight out of the README: 'MotorwayClass' object has no attribute 'hash_' means the key you typed doesn't exist on the pipe yet.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_model_key | STRING | model | — |
| INPUT_cond1_key | STRING | cond1 | — |
| INPUT_cond2_key | STRING | cond2 | — |
| INPUT_negative_key | STRING | negative | — |
| cfg_conds | FLOAT | 8.00–100 | — |
| cfg_cond2_negative | FLOAT | 8.00–100 | — |
| OUTPUT_GUIDER_key | STRING | GUIDER | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |