ComfyUI Node

Motorway 5x2

Five things in, two out, everything else rides the bus

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

Motorway 5x2 is the consolidation node of the agilly1989 Motorway pack: five inputs, two outputs. The math is the message - you can keep only two lanes as live wires, and the other three values still get onto the bus where any downstream ramp can pull them by key. It's the node for the moment your workflow collects five things it needs, but only two of them need to stay in front of you. Everything else goes in the box and travels.

The pack is a pipe implementation. A MotorwayClass bus carries values under string keys from node to node; every Motorway AxB is an on/off ramp that files inputs onto the bus and pulls outputs off. The bus starts with MotorwayStart (or a Motorway primitive like MotorwayStr), always continues out of the first output socket, and is cloned at every node so forked branches stay isolated. The README's status line is unmissable: "CURRENTLY IN ACTIVE DEVELOPMENT (BETA)! IF THINGS BREAK ITS BECAUSE I BROKE IT."

The layout

Required input MOTORWAY πŸšŒπŸ’¨; five data inputs ANY_(A) through ANY_(E) (typed * - any type); five key fields ANY_(A)_key through ANY_(E)_key; outputs MOTORWAY πŸšŒπŸ’¨, ANY (A) and ANY (B).

Lanes A and B are write-through: input A files under key A and output ANY (A) reads key A back out, same for B. Inputs C, D and E have no matching output, so they're pure store lanes - file them under keys and let later ramps pull them. The practical pattern: put your two most-inline values on A and B, use C–E for "put this on the bus for later." Or flip it: leave the inputs alone and use the two outputs as pure exits by typing existing keys from upstream into their key fields.

Install

ComfyUI Manager search "ComfyUI_agilly1989_motorway", or:

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

Restart ComfyUI. No models to download, no pip dependencies - pure Python.

Where it bites

The README's documented error 'MotorwayClass' object has no attribute 'hash_...' is what you hit when an output key points at a value nobody wrote - usually a typo, and keys are sha256-hashed internally, so the typo reads an empty slot instead of failing on the spelling. And don't wire an output with a blank key; you'll get nothing out of it. Fill keys for every lane you actually use.

Categoryagilly1989 Nodes/Motorways

Inputs (11)

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

Outputs (3)

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