ComfyUI Node

Motorway 6x2

Six in, two out, four lanes that never leave

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

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.

Categoryagilly1989 Nodes/Motorways

Inputs (13)

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

Outputs (3)

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