ComfyUI Node

Motorway 7x5

The bus ramp that hands back more than it takes

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

Here's the thing about Motorway 7x5: the five outputs don't have to be fed by the seven inputs. In the Motorway pack, inputs write values onto a shared named bus and outputs read values off it, and the two sets are completely independent. So a 7x5 is the ramp you pick when you want to attach seven things to the bus and then pull five things off - maybe the same five, maybe five you wrote on a completely different ramp earlier in the graph.

The pack is ComfyUI_agilly1989_motorway by agilly1989, a self-described "pipe" implementation for ComfyUI. Where rgthree's Context bundles a fixed set of connections down one wire, this one is a plain dictionary that rides a single MOTORWAY πŸšŒπŸ’¨ connection and lets you name your own keys. It's the difference between a coat rack with a few hooks and a locker room.

How it works

Every Motorway node runs the same tiny routine. It takes the bus in, looks at each of its input sockets, and for every one that's connected and has a non-empty _key string, it stores that value on the bus under that key. Then it clones the bus and hands the clone to the outputs. For each output socket, it reads the bus with whatever key you typed into the matching _key field and emits the result.

Because the keys are hashed with sha256 under the hood, "model" and "Model" are two different keys - case matters. And because the bus is cloned at every step, anything you wrote upstream is still available downstream until a later write to the same key replaces it. That last-writer-wins behavior is the one real trap in the whole design.

The inputs and outputs that matter

  • MOTORWAY πŸšŒπŸ’¨ (input + output) - the bus itself, always required in, always carried out.
  • ANY (A) through ANY (G) - seven inputs. Each has a _key field; type the name you want that value stored under.
  • ANY (A) through ANY (E) - five outputs. Type a key into each _key field to pull that named value off the bus.

Output keys can be anything that's on the bus - not just what you plugged into this node. That's the superpower: your "positive" and "negative" conditioning written at the top of the workflow can be fetched here without a single wire crossing the canvas.

Installing it

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

Restart ComfyUI afterwards, or grab it through ComfyUI Manager (search "motorway"). There are no pip dependencies and no model files - the whole pack is Python standard library. It does register all ~120 Motorway variants at once, so the node menu gets noticeably busier (the irony is not lost).

Common issues

  • 'MotorwayClass' object has no attribute 'hash_' means you asked for a key that was never written. Nine times out of ten it's a typo or a case mismatch. Keys are exact strings.
  • Output sockets shift if you leave a key blank. Only non-empty keys produce output, and sockets are positional. Keep ANY (A)_key through ANY (E)_key filled in order.
  • Beta with a capital B. The README warns it's broken with async until the author gets around to it, and otherwise says "if things break it's because I broke it." For normal runs it works, but don't build a production pipeline on it yet.
Categoryagilly1989 Nodes/Motorways

Inputs (15)

NameTypeDefaultDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
ANY_(A)opt*β€”
ANY_(B)opt*β€”
ANY_(C)opt*β€”
ANY_(D)opt*β€”
ANY_(E)opt*β€”
ANY_(F)opt*β€”
ANY_(G)opt*β€”
ANY_(A)_keyoptSTRINGβ€”
ANY_(B)_keyoptSTRINGβ€”
ANY_(C)_keyoptSTRINGβ€”
ANY_(D)_keyoptSTRINGβ€”
ANY_(E)_keyoptSTRINGβ€”
ANY_(F)_keyoptSTRINGβ€”
ANY_(G)_keyoptSTRINGβ€”

Outputs (6)

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