ComfyUI Node

Motorway 6x5

The 5x5's bigger sibling for one extra lane

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

Motorway 6x5 is what you get when the trusty 5x5 just isn't quite wide enough: six inputs in, five ANY outputs out, plus the continuing MOTORWAY πŸšŒπŸ’¨ wire. From the agilly1989 Nodes/Motorways pack, it's the square's one-step-bigger sibling - for workflows where six values need to ride one bus but only five need to step off at this stop.

The 6x5 names the shape. It gets six key slots (A through F), one per input, and the five outputs read by keys A through E. So lanes A–E are write-and-read, and lane F is a pure write: park a value there that a later stop will fetch by name. If you've ever caught yourself wedging six values into a 5x5 and leaving the sixth dangling on a long wire, this is the honest fix - an extra lane, no rework.

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–E for the outputs, and passes the bag forward. A key written at any earlier stop is readable at any later stop; a reused key overwrites rather than keeps both.

That's the same bargain rgthree's Context nodes and Efficiency Nodes offer - fewer wires, values traveling by name - just implemented as a loose keyed dict. It's fast to build and genuinely tidier on a big canvas, and like every pipe, it trades a little "what did I name this" archaeology for that tidiness.

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 (E). The A–E outputs return whatever those keys hold after this stop's writes, so keying an input and reading its output is the standard round-trip. Empty keys idle their lanes, so this node happily runs as a 4x3 if that's all you need today.

Installing it

ComfyUI Manager - search ComfyUI_agilly1989_motorway - or clone:

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

Restart ComfyUI. No requirements.txt, no model downloads; pure Python on ComfyUI's own comfy_types, so install is a one-liner. It's a one-person beta project - the README literally opens with "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION" - so treat updates as a maybe.

Common issues

The familiar error is KeyError: Key: 'x' doesn't exist in motorway (README's 'MotorwayClass' object has no attribute 'hash_'): an output read a key nothing has written, usually a typo or case mismatch - keys are exact strings. And keep the overwrite rule in mind: if an earlier stop already owns one of your six keys, this node silently replaces the 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 (6)

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