ComfyUI Node

Motorway 3x2

Motorway 3x2

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

Motorway 3x2 is a "three in, two out" junction from the agilly1989 Motorway pack - three values join the bus, two named ones come off it immediately, and the third rides along for later. It reads Motorway [inputs]x[outputs], so this is the shape for the moment when you're actively passing two values down a branch but also want to stash a third without letting it clutter the wires.

The Motorway is a beta "pipe" implementation by solo dev agilly1989, same genre as rgthree's Context nodes and Impact Pack pipes: instead of dragging every value across the graph on its own wire, you park them on a bus. The transport is a MotorwayClass object carried on the MOTORWAY πŸšŒπŸ’¨ connection, which is the required input on every node and always the first output so the route continues. Start with MotorwayStart; the bus has to begin somewhere.

How it works

The key mechanism is uniform across the pack. Wire values into ANY_(A), ANY_(B) and ANY_(C), name each in its _key box, and all three are stored. Because the pack hands out as many key slots as the larger side - three here - but only two data outputs, you get:

  • inputs ANY_(A), ANY_(B), ANY_(C) with keys ANY_(A)_key, ANY_(B)_key, ANY_(C)_key
  • the required MOTORWAY πŸšŒπŸ’¨ bus input
  • outputs MOTORWAY πŸšŒπŸ’¨, ANY (A), ANY (B)

Slots A and B are double-duty: each key names its input and reads its own output, so the two values you connect there come right back out. Slot C is write-only - its key stores a value on the bus with no output attached, for some later node to pull. A typical use: pass model and clip straight through to the current branch, stash seed on C, and read seed three junctions later. That "write one extra, surface two" pattern is exactly what 3x2 exists for.

Keys are sha256-hashed into hash_… attributes internally - why a missing key reads 'MotorwayClass' object has no attribute 'hash_'. And writing the same key twice anywhere overwrites the first value; the bus keeps only the latest per name.

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. No pip dependencies, no model files; pure Python, so install is clone-and-restart.

Common issues

  • The hash_ error is a key that was never written or is spelled differently upstream. Keys match exactly - case and spaces count.
  • Every _key box needs a value; an empty one means that output is never produced and wiring anything into it errors on a missing output.
  • Only key connected inputs. Keying a disconnected slot stores None under that name and can wipe a value you needed.

Beta pack, author's disclaimer included. For "pass two, stash one," 3x2 is the right amount of node.

Categoryagilly1989 Nodes/Motorways

Inputs (7)

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

Outputs (3)

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