ComfyUI Node

Motorway 2x7

Motorway 2x7

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

Motorway 2x7 is a "two in, seven out" junction from the agilly1989 Motorway pack, and by now you can guess the arithmetic: seven outputs, two of which echo what you just put in, five of which are free taps into values that were already on the bus. It's the node you pick when two shared values need to reach a lot of different places without you dragging wires across the whole graph.

The Motorway is a beta "pipe" implementation by solo dev agilly1989 - conceptually the same thing as rgthree's Context nodes or Impact Pack pipes, but with a different transport. Instead of a dict, it's a MotorwayClass bus object passed along one connection, the MOTORWAY πŸšŒπŸ’¨ wire that's the required input on every node and the first output on every node. Start with MotorwayStart, then chain junctions freely; the pack's Example.json shows the pattern.

How it works

The mechanism never changes across the pack, which is the good news. Everything is keys. Connect values to ANY_(A) and ANY_(B), name them in ANY_(A)_key / ANY_(B)_key, and they're stored on the bus. Because the pack gives you as many key slots as the larger side - here, seven - you get:

  • inputs ANY_(A) and ANY_(B) with keys
  • read-only key slots ANY_(C)_key through ANY_(G)_key
  • the required MOTORWAY πŸšŒπŸ’¨ bus input
  • outputs MOTORWAY πŸšŒπŸ’¨, ANY (A) through ANY (G)

Slots A and B are double-duty: each names its input and reads its own output back. The five C–G slots are pure taps. Type any key that exists on the bus into one and its output delivers the value. So you can be carrying just model and clip into this node while surfacing seed, steps, cfg, denoise and lora that a write-only node parked earlier - five reads, one compact node.

Keys are sha256-hashed into hash_… attributes internally, which is why a missing key surfaces as 'MotorwayClass' object has no attribute 'hash_' rather than something friendly. And writing the same key twice anywhere on the route overwrites the older value.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

then restart ComfyUI, or search ComfyUI_agilly1989_motorway in ComfyUI Manager. No pip dependencies, no model downloads - pure Python, so install is clone, restart, go.

Common issues

  • The hash_ error is a key that was never written or is mistyped. Keys are matched exactly - watch spacing and case.
  • Every _key box needs a value. An empty one means that output is never produced, so wiring anything into it errors on a missing output.
  • Only key inputs you actually connected. An unconnected input with a key writes None over that name, wiping anything stored there.

Beta pack, author's honesty included, but if you're moving two values and tapping five more, 2x7 is the shape that keeps the canvas clean.

Categoryagilly1989 Nodes/Motorways

Inputs (10)

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

Outputs (8)

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