Motorway 2x3
Motorway 2x3
- MOTORWAY ππ¨
- ANY_(A)
- ANY_(B)
- MOTORWAY ππ¨
- ANY (A)
- ANY (B)
- ANY (C)
Motorway 2x3 is where the fan-out starts to get interesting. The name is Motorway [inputs]x[outputs], so this is two values in, three named values out - one more output than input. It's from the agilly1989 Motorway pack, a beta "pipe" implementation by solo dev agilly1989, and it exists because sometimes two inputs are all you're carrying but three consumers downstream each need something.
The whole pack is a wire-spaghetti reducer in the same family as rgthree's Context nodes and Impact Pack pipes. Instead of dragging every value across the canvas on its own wire, you park values on a bus - a MotorwayClass object passed along a single connection. That connection is literally called MOTORWAY ππ¨, it's the required input on every node, and the same type is always the first output so the route can continue. You start with MotorwayStart and drive the bus through however many junctions you like.
How it works
Wire two values into ANY_(A) and ANY_(B), name each in ANY_(A)_key / ANY_(B)_key, and the node stores both on the bus. The extra wrinkle of a 2x3 is that there are three key slots - ANY_(A)_key through ANY_(C)_key - because the pack gives you as many keys as the larger of inputs or outputs. So:
- inputs
ANY_(A)andANY_(B)(each with a key) - an extra read-only key slot
ANY_(C)_keywith no matching input - the required
MOTORWAY ππ¨bus input - outputs
MOTORWAY ππ¨,ANY (A),ANY (B),ANY (C)
Keys A and B double as both the name for their input and the read for their output - write model into A and output A gives you model back. Key C is the payoff: there's no input C, so it's a pure reader. Type any key that's already on the bus - a seed parked four nodes earlier, say - into ANY_(C)_key, and output C hands it over. That's the whole reason to pick a 2x3 over a 2x2: one extra "tap" for free.
Keys are sha256-hashed into hash_β¦ attributes internally, and storing the same key twice overwrites the old value. If you ever see 'MotorwayClass' object has no attribute 'hash_', that's a key you referenced that was never written - check your spelling, because matching is exact.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
then restart ComfyUI, or find ComfyUI_agilly1989_motorway in ComfyUI Manager. Pure Python, no pip dependencies, no model downloads - install is clone-and-restart and nothing else.
Common issues
- The
hash_error: key never written, or a mismatch in spelling/case. Keys are exact strings. - Fill the key for every output you read. An empty
_keymeans that output is never produced, so wiring anything into it makes ComfyUI error on a missing output. - Don't key a slot you left disconnected - it stores
Noneover that key. If you only have two inputs, leave C for a real read.
Beta pack, fair warning from the author, but the "write two, read three" shape is a genuinely handy one when you're feeding a few branches at once.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| ANY_(A)opt | * | β | |
| ANY_(B)opt | * | β | |
| ANY_(A)_keyopt | STRING | β | |
| ANY_(B)_keyopt | STRING | β | |
| ANY_(C)_keyopt | STRING | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |
| ANY (A) | * | β |
| ANY (B) | * | β |
| ANY (C) | * | β |