ComfyUI Node

Motorway 7x4

The Motorway ramp for when you want most of it back

By agilly1989Β·Created 2 years agoΒ·Updated about a year agoΒ· 7
Motorway 7x4
  • 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_(A)_keyβ€”β–Ί
β—„ANY_(B)_keyβ€”β–Ί
β—„ANY_(C)_keyβ€”β–Ί
β—„ANY_(D)_keyβ€”β–Ί
β—„ANY_(E)_keyβ€”β–Ί
β—„ANY_(F)_keyβ€”β–Ί
β—„ANY_(G)_keyβ€”β–Ί

Motorway 7x4 is a node for the middle of a workflow: you've got seven things you want to hand onto a shared bus, and you want four of them back at this particular spot. It comes from ComfyUI_agilly1989_motorway, a small custom-node pack that implements what the author calls a "pipe" - a named-value bus that rides a single MOTORWAY πŸšŒπŸ’¨ wire through your graph and lets you stash values on it and fetch them by name, instead of dragging wires halfway across the canvas.

The "7x4" is literal: seven inputs, four outputs. Every variant of the Motorway node is just a different count of on-ramps and off-ramps generated from the same logic, so once you've used one you've used them all. 7x4 is a good middle-of-the-road pick - enough inputs to bundle a typical model, conditioning and settings set, and enough outputs to hand most of it to the next stage while the bus continues on its own output.

How it works

The bus is a small dict-like object that gets passed from node to node. Your key names are the real keys, stored under a sha256 hash so lookups are exact and cheap. When the node runs, it takes the incoming bus from the required MOTORWAY πŸšŒπŸ’¨ input, writes every connected ANY (A)…ANY (G) value onto the bus under the name you typed in its matching _key field, clones the bus, and passes the clone forward. Output sockets don't have to match the inputs you just wrote - they read whatever key you name, from anywhere on the bus.

Because each node clones the bus, values persist downstream until a later node writes the same key again. That's the entire trick: the motorway is a shared dictionary with extra steps, which is exactly why it can collapse a dozen long wires into one.

The inputs and outputs that matter

  • MOTORWAY πŸšŒπŸ’¨ - required input (the bus from upstream) and output (the bus, carried on).
  • ANY (A) through ANY (G) - the seven input sockets, each with a _key string that names whatever you plug in.
  • ANY (A) through ANY (D) - the four output sockets; type a key into each to pull that value off the bus.

Practically: connect your seven values, type seven names, then type four names into the output keys and wire those four where they're needed. Everything else is automatic.

Installing it

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

Then restart ComfyUI. It's also in ComfyUI Manager under "Install Custom Nodes" if you search "motorway". No pip packages, no model downloads - pure Python, nothing extra to fetch. The clone registers every Motorway variant at once, so expect the menu to grow.

Common issues

  • The dreaded 'hash_' error - reading an output key that was never written to the bus. Check spelling and case; keys are exact and case-sensitive.
  • Blank output keys shuffle the sockets. Outputs are only emitted for non-empty keys and they're positional, so keep A, B, C, D filled in order or your wires land on the wrong sockets.
  • Overwriting happens silently. If two ramps write the same key, the later one wins. If a value "mysteriously changes" downstream, that's the bus doing exactly what you told it to.

It's beta software and the author says so loudly in the README, including a warning that async execution is currently broken. For ordinary single-run workflows it's fine - just know what you're signing up for.

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 (5)

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