Motorway 2x4
Motorway 2x4
- MOTORWAY ππ¨
- ANY_(A)
- ANY_(B)
- MOTORWAY ππ¨
- ANY (A)
- ANY (B)
- ANY (C)
- ANY (D)
Motorway 2x4 is a "two in, four out" junction from the agilly1989 Motorway pack - two values go onto the bus, and you get four named outputs, two of which are pure taps into values that were already parked there. It's the kind of node you reach for when a workflow has two things you're actively passing along, but four different spots downstream each need something from the bus.
The Motorway is a beta "pipe" implementation by solo dev agilly1989, in the same family as rgthree Context nodes and Impact Pack pipes. Where those carry a dict, this one passes a MotorwayClass bus object along a single wire - the MOTORWAY ππ¨ connection that every node in the pack shares as its required input and its first output. You begin every route with MotorwayStart (the Motorway primitive nodes can also start one), then thread the bus through as many junctions as you need.
How it works
The mechanism is consistent across the whole pack, so once you've got one you've got them all. Connect two values to ANY_(A) and ANY_(B), type a key into ANY_(A)_key and ANY_(B)_key, and both get stored on the bus under those names. Then the fun part of a fan-out node: there are four key slots - ANY_(A)_key through ANY_(D)_key - because the pack hands you as many keys as the larger side, inputs or outputs. Slots A and B are double-duty: the key names the input and reads the matching output. Slots C and D have no input behind them, so they're read-only taps - type any key that exists on the bus and the output hands it over.
So for this node:
- inputs
ANY_(A)andANY_(B)with keys - read-only key slots
ANY_(C)_keyandANY_(D)_key - the required
MOTORWAY ππ¨bus input - outputs
MOTORWAY ππ¨,ANY (A)throughANY (D)
A concrete picture: write positive and negative on A and B, and use C and D to pull seed and steps that a 2x0 parked earlier in the route. One compact node, four consumers fed. Keys are sha256-hashed to hash_β¦ attributes internally, so a missing key surfaces as 'MotorwayClass' object has no attribute 'hash_' rather than anything friendly - and writing the same key twice overwrites the first value.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
then restart ComfyUI, or use ComfyUI Manager and search ComfyUI_agilly1989_motorway. No pip packages, no model files. Pure Python, so it's clone-and-restart.
Common issues
hash_error: key never written, or written with different spacing/case. Keys match exactly.- Empty
_keyboxes are the classic footgun - the output for that slot is never produced, so wiring anything into it makes ComfyUI error on a missing output. Fill every key. - Leave the read-only slots (C and D) disconnected; keying a slot with no input stores
Noneand can erase a value you wanted.
Beta pack, and the author's README basically shrugs at you, but for "pass two, tap four" it's exactly the right shape.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| ANY_(A)opt | * | β | |
| ANY_(B)opt | * | β | |
| ANY_(A)_keyopt | STRING | β | |
| ANY_(B)_keyopt | STRING | β | |
| ANY_(C)_keyopt | STRING | β | |
| ANY_(D)_keyopt | STRING | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |
| ANY (A) | * | β |
| ANY (B) | * | β |
| ANY (C) | * | β |
| ANY (D) | * | β |