KSamplerAdvanced_motorway_edition
Step-by-step sampling control, now with a pipe commute
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
KSamplerAdvanced_motorway_edition is the KSamplerAdvanced you already know, rewired to eat from and poop into a Motorway pipe instead of taking cables. The underlying node is the "advanced" sibling of KSampler, and the only real difference is that this one grabs its model, positive, negative and latent from named keys in the motorway and drops its output latent back under a key you choose.
What makes Advanced "advanced"
Where plain KSampler hides the noise math from you, KSamplerAdvanced hands you the denoising timeline directly. Three controls do the work:
start_at_step/end_at_step- run the sampler over only a slice of the total steps. Setend_at_stepto, say, 15 of 20 and you get a partial denoise you can feed into another sampler. That's how you chain samplers, or do the classic "sample most of the way with one, finish with a detail-heavy one."add_noise(enable/disable) - skip injecting fresh noise at step zero. You disable it when the latent you're feeding is already noisy and you just want to continue from where another sampler left off.return_with_leftover_noise(enable/disable) - with it enabled, the output keeps residual noise, which is exactly what you want when this node is a middle stage in a multi-sampler chain rather than the last one. The last sampler in a chain flips it off so you get a clean latent.
You get the same noise_seed, steps, cfg, sampler_name and scheduler widgets as plain KSampler, plus that start_at_step/end_at_step/return_with_leftover_noise trio. The tooltips match core ComfyUI, so hover anything you're unsure of.
The motorway-specific part
Four inputs become key fields instead of sockets:
INPUT_model_key→"model"by defaultINPUT_positive_key→"positive"INPUT_negative_key→"negative"INPUT_latent_image_key→"latent_image"OUTPUT_LATENT_key→"LATENT"
Whatever is stored under those keys in the pipe when this node runs is what gets sampled. Because the motorway is just a dict-like bag that each node passes forward, ordering matters: if two nodes write to the same key, the last one to run wins, and this node reads whatever that is. Keys are case-sensitive and exact.
The node returns only the MOTORWAY 🚌💨. To do something with the finished latent you read LATENT out through a Motorway AxB ramp and hand it to a normal VAEDecode. If you're in a hurry and just want one sample, plain KSampler (motorway edition or not) is less to think about - Advanced earns its keep precisely when you're building the chained, multi-pass workflows the step controls exist for.
Install and gotchas
Same as every node in this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
then restart ComfyUI. Or grab it via ComfyUI Manager. No dependencies beyond the pack itself; it's a thin wrapper over core ComfyUI.
Before you go far with it, the caveats. This pack is unapologetically beta - the readme says "IF THINGS BREAK ITS BECAUSE I BROKE IT." The current repo HEAD is a hotfix that has the generated node registration commented out, so these _motorway_edition nodes may not even load on a fresh clone; if the node is missing from your menu, that's the pack, not you. And the classic runtime error, 'MotorwayClass' object has no attribute 'hash_', means a key you referenced was never written to the pipe - usually a typo or a node upstream that didn't execute. Check your key strings before tearing the workflow apart.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_model_key | STRING | model | — |
| INPUT_positive_key | STRING | positive | — |
| INPUT_negative_key | STRING | negative | — |
| INPUT_latent_image_key | STRING | latent_image | — |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable | |
| OUTPUT_LATENT_key | STRING | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |