ComfyUI Node

Motorway 0x4

The whole KSampler bundle, off one Motorway ramp

By agilly1989Β·Created 2 years agoΒ·Updated about a year agoΒ· 7
Motorway 0x4
  • MOTORWAY πŸšŒπŸ’¨
  • MOTORWAY πŸšŒπŸ’¨
  • ANY (A)
  • ANY (B)
  • ANY (C)
  • ANY (D)
β—„ANY_(A)_keyβ€”β–Ί
β—„ANY_(B)_keyβ€”β–Ί
β—„ANY_(C)_keyβ€”β–Ί
β—„ANY_(D)_keyβ€”β–Ί

Motorway 0x4 is the sweet spot of this pack: a four-lane off-ramp, and the four values it pulls are almost always model, positive, negative and latent - exactly what a KSampler wants. In the pack's own Example.json, a 0x4 is the node that feeds the sampler, and honestly it's the ramp that makes the whole bus idea click.

This comes from agilly1989's ComfyUI_agilly1989_motorway, a key-value bus ("pipe") for ComfyUI. Everything rides one MOTORWAY πŸšŒπŸ’¨ wire; nodes store values under string keys and pull them back out later. Same goal as rgthree's Context nodes - fewer wires, a cleaner graph - but where Context bundles a typed object, the Motorway is an any-typed bag.

How it works

Motorway NxB exposes B keyed outputs. Type model, positive, negative, latent into the four _key boxes, and each matching value appears on the ANY (A..D) outputs as type *, ready to plug straight into the sampler's four inputs. The bus is cloned at every hop - a snapshot, not in-place mutation - and keys are exact strings, SHA-256 hashed internally. Last write wins on duplicates.

A typical bus flow: MotorwayStart β†’ a 4x0 on-ramp stores the checkpoint trio and a latent β†’ a couple of 0x1s hand clip to the prompt encoders β†’ a 2x0 stores both conditionings β†’ this 0x4 pulls all four sampler inputs off the bus in one shot. That's the pattern the example workflow lives on.

Inputs and outputs that matter

  • MOTORWAY πŸšŒπŸ’¨ (required) - the bus.
  • ANY_(A)_key through ANY_(D)_key (optional) - the four keys to pull.
  • Outputs: MOTORWAY πŸšŒπŸ’¨ plus ANY (A) through ANY (D).

Blank keys are fine; unused outputs just dangle.

Installing

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

or ComfyUI Manager β†’ "ComfyUI_agilly1989_motorway", then restart. No pip deps, no model files.

Where people get burned

  • 'MotorwayClass' object has no attribute 'hash_' - the classic. One of the four keys isn't on the bus yet, usually because the write happens after this node in the graph, or a key string differs by a space.
  • Sampler receives nothing - check that positive/negative were actually stored (the 2x0 after the encoders), not just typed into a widget somewhere.
  • Beta. The README literally opens "CURRENTLY IN ACTIVE DEVELOPMENT (BETA)! IF THINGS BREAK ITS BECAUSE I BROKE IT." Flows between versions can and do break; pin what you rely on.

If you're evaluating the pack at all, load Example.json - the 0x4 feeding the KSampler is the moment the design makes sense.

Categoryagilly1989 Nodes/Motorways

Inputs (5)

NameTypeDefaultDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
ANY_(A)_keyoptSTRINGβ€”
ANY_(B)_keyoptSTRINGβ€”
ANY_(C)_keyoptSTRINGβ€”
ANY_(D)_keyoptSTRINGβ€”

Outputs (5)

NameTypeDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
ANY (A)*β€”
ANY (B)*β€”
ANY (C)*β€”
ANY (D)*β€”