Motorway 5x8
The distribution hub for a crowded pipeline
- MOTORWAY ππ¨
- ANY_(A)
- ANY_(B)
- ANY_(C)
- ANY_(D)
- ANY_(E)
- MOTORWAY ππ¨
- ANY (A)
- ANY (B)
- ANY (C)
- ANY (D)
- ANY (E)
- ANY (F)
- ANY (G)
- ANY (H)
Motorway 5x8 is what you grab when five values arrive and eight places need them. It's a fan-out pipe from the agilly1989 Nodes/Motorways pack, and its whole job is to stop you dragging the same wire to eight different consumers. Instead, values ride one MOTORWAY ππ¨ wire as a keyed bag, and every stop that needs a value just asks for it by name.
The 5x8 naming means five inputs, eight outputs. That's a 3-output surplus over its inputs, which translates into three pure read lanes (F, G and H) with no input wire attached. Those lanes are the reason this node exists: you park five new things and also pull back three older things that earlier stops stored. One compact stop does what used to take a wall of reroutes and long wires.
How it works
The mechanism is simple once you see it. The motorway is a custom class that acts like a dict, keys stored under sha256 hashes. When the node runs, it pops the incoming motorway, stores each connected ANY_(A)βANY_(E) input under the text in its matching _key widget, clones the bag, reads one key per output slot, and hands the bag down the line. Anything written at an earlier stop is fair game for any later read, which is the entire trick. The flip side is the README's warning: reuse a key further down and you overwrite the old value rather than keeping both.
Because there are eight key slots (A through H) and only five inputs, slots F, G and H have keys but no ANY input. Those are read-only: type seed into the H key and ANY (H) returns whatever the route currently holds under "seed." It's a tidy way to broadcast a value to multiple downstream stops without a single long wire.
The inputs and outputs that matter
Required: MOTORWAY ππ¨ (only connects to other Motorway nodes). Optional inputs ANY_(A) through ANY_(E), each with a _key widget. Outputs: MOTORWAY ππ¨ plus ANY (A) through ANY (H). Empty keys are skipped, so unused lanes don't error - you can run this as a 3x5 if you feel like it.
Installing it
ComfyUI Manager is the easy route - search ComfyUI_agilly1989_motorway. Or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI. No requirements.txt, no model files to fetch, pure Python on ComfyUI's own type helpers. Worth knowing before you rely on it: this is a one-person beta project - the README's top line is an honest "if things break it's because I broke it" - so pin your version if a workflow depends on it.
Common issues
The telltale failure is KeyError: Key: 'x' doesn't exist in motorway (the README version: 'MotorwayClass' object has no attribute 'hash_'). That's a read of a key no stop has written - usually a typo or a case mismatch; keys are exact strings. The other classic is the overwrite trap: if a later stop reuses a key you already wrote, it silently replaces the value, and downstream reads get the new one. Keep keys unique per pipeline and you'll be fine.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| ANY_(A)opt | * | β | |
| ANY_(B)opt | * | β | |
| ANY_(C)opt | * | β | |
| ANY_(D)opt | * | β | |
| ANY_(E)opt | * | β | |
| ANY_(A)_keyopt | STRING | β | |
| ANY_(B)_keyopt | STRING | β | |
| ANY_(C)_keyopt | STRING | β | |
| ANY_(D)_keyopt | STRING | β | |
| ANY_(E)_keyopt | STRING | β | |
| ANY_(F)_keyopt | STRING | β | |
| ANY_(G)_keyopt | STRING | β | |
| ANY_(H)_keyopt | STRING | β |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |
| ANY (A) | * | β |
| ANY (B) | * | β |
| ANY (C) | * | β |
| ANY (D) | * | β |
| ANY (E) | * | β |
| ANY (F) | * | β |
| ANY (G) | * | β |
| ANY (H) | * | β |