ComfyUI Node

Motorway 6x4

Carry six, show four, keep two in reserve

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

Motorway 6x4 is the mid-sized pipe from the agilly1989 Nodes/Motorways pack: six inputs in, four ANY outputs out, plus the continuing MOTORWAY πŸšŒπŸ’¨ wire. It's for the workflow where you're carrying six values down one bus wire and need four of them handed off at this stop - the other two stay in the bag for a later read.

The 6x4 names the shape, and like every node in the family it gets one key slot per input - six slots, A through F. The four outputs read by keys A, B, C and D, which leaves lanes E and F as pure writes: park a latent, park a mask, and some downstream stop pulls them out by key without a single long wire between them. That asymmetry - more keys than outputs - is exactly what a staging stop should feel like.

How it works

Same machinery as all the Motorway nodes. The motorway object behaves like a dict, keys stored under sha256 hashes. When the node runs it pops the incoming MOTORWAY πŸšŒπŸ’¨, stores each connected input under its _key widget value, clones the bag, reads keys A–D for the outputs, and passes the bag forward. Values written at earlier stops are readable at later stops by name, and a reused key overwrites the old value - the README's one rule to respect.

The ordering detail worth knowing: outputs are read after this stop's writes, so the A–D outputs reflect whatever those keys hold at this point in the route, not what they held when you first stored them. If an earlier stop wrote "seed" and you don't touch the A key, ANY (A) returns that earlier seed. If you do write it, you get the new one.

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) through ANY (D). For a beginner: the outputs are only as useful as the keys you type - empty key means an idle lane and no output value, not a pass-through.

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 downloads; it's pure Python on ComfyUI's own type helpers. It's a beta, one-developer project with a README that opens by warning you things will break - pin the version if you depend on it.

Common issues

KeyError: Key: 'x' doesn't exist in motorway (README's 'MotorwayClass' object has no attribute 'hash_') is the tell that an output read a key no stop has written - usually a typo; keys are exact, case-sensitive strings. And remember the overwrite trap: with six keys and four outputs, it's easy to reuse a name an earlier stop already owns and silently replace its value.

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 (5)

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