Motorway 6x2
Six in, two out, four lanes that never leave
- MOTORWAY ππ¨
- ANY_(A)
- ANY_(B)
- ANY_(C)
- ANY_(D)
- ANY_(E)
- ANY_(F)
- MOTORWAY ππ¨
- ANY (A)
- ANY (B)
Motorway 6x2 is the "stash most, release a little" node: six inputs in, two ANY outputs out, plus the continuing MOTORWAY ππ¨ wire. It's from the agilly1989 Nodes/Motorways pack, and it earns its keep whenever you have six values to carry forward but only two to hand off at this exact spot - the other four ride the bus and get read by key at later stops.
The 6x2 names the shape: six inputs, two outputs. It still gets six key slots (A through F), one per input, and the two outputs read by keys A and B. So lanes C through F are pure writes - park a model, a VAE, a latent, a mask and let some later stop pull them out by name - while A and B are write-and-read lanes. This is the pipe equivalent of "I don't want to wire all six of these to the sampler, just hand me two and remember the rest."
How it works
Same engine as every Motorway node. The motorway is a custom class that behaves like a dict, keys stored under sha256 hashes. When the node runs, it pops the incoming MOTORWAY ππ¨, stores each connected ANY_(A)βANY_(F) input under its _key widget value, clones the bag, reads keys A and B for the two outputs, and passes the bag forward. Any key written at an earlier stop is readable at any later stop, and reusing a key overwrites rather than appends - the README's one hard rule.
The read-after-write ordering matters for the A and B outputs: they return whatever those keys hold after this stop's writes. So if you plug a latent into ANY_(A) and key it latent, the ANY (A) output hands back that latent immediately. If you leave A's key empty, the output stays idle - no value, no error, just nothing to connect.
The inputs and outputs that matter
Required MOTORWAY ππ¨ input (Motorway-type only). Six optional inputs ANY_(A) through ANY_(F) with _key widgets. Outputs: MOTORWAY ππ¨, ANY (A), ANY (B). For a beginner: only the A and B keys produce outputs, so if you need to see one of the CβF values right here, this is the wrong node - grab a 6x5 or bigger fan-out instead.
Installing it
ComfyUI Manager - search ComfyUI_agilly1989_motorway - or:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI. No requirements.txt, no model files; pure Python on ComfyUI's own type helpers. One-person beta project, so updates can shuffle things - don't build a production workflow on it without pinning a version.
Common issues
The familiar failure is KeyError: Key: 'x' doesn't exist in motorway (README's 'MotorwayClass' object has no attribute 'hash_') - a downstream stop read a key this node never wrote, usually a typo or case mismatch; keys are exact strings. And remember the overwrite rule: six keys mean six chances to clobber a value an earlier stop stored. Keep keys unique per pipeline.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| ANY_(A)opt | * | β | |
| ANY_(B)opt | * | β | |
| ANY_(C)opt | * | β | |
| ANY_(D)opt | * | β | |
| ANY_(E)opt | * | β | |
| ANY_(F)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 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |
| ANY (A) | * | β |
| ANY (B) | * | β |