ComfyUI Node

Motorway 3x1

Motorway 3x1

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

Motorway 3x1 is the most lopsided node in the agilly1989 Motorway pack's three-input row: three values go in, and only one named value comes out. The name follows the pack's Motorway [inputs]x[outputs] convention, so it's three in, one out. What that actually buys you: you can park three things on the bus and hand exactly one of them to the current branch of the graph, while the other two ride along for later.

The Motorway is a beta "pipe" implementation by solo dev agilly1989 - the same idea as rgthree's Context nodes or Impact Pack pipes, but the transport is a MotorwayClass bus object instead of a dict. Every node shares the MOTORWAY πŸšŒπŸ’¨ connection as its required input and its first output, so a route starts at MotorwayStart and continues through as many junctions as you like. Load the pack's Example.json to see the intended pattern.

How it works

Everything runs on keys. Connect values to ANY_(A), ANY_(B) and ANY_(C), type a name into each of the three _key boxes, and all three get stored on the bus. The asymmetry shows up on the output side: because the pack provides as many keys as the larger of inputs or outputs (three here), but only one data output, 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 πŸšŒπŸ’¨ and ANY (A)

So keys B and C are write-only - they store steps and cfg, say, with no output attached - while key A does double duty: it names input A for storage and reads output A. In other words, one value gets surfaced to the current branch and the other two vanish onto the bus for some later node to pull by key. If you wanted the surfaced value to be one you didn't just write, you can't do that here - slot A's key is fixed to whatever input A is storing - but for "store three, show one" it's exactly right.

Keys are sha256-hashed to hash_… attributes internally, so a missing key errors as 'MotorwayClass' object has no attribute 'hash_'. Reusing a key anywhere on the route overwrites the previous value.

Installing

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

then restart ComfyUI, or install from ComfyUI Manager under ComfyUI_agilly1989_motorway. No pip dependencies, no model downloads; pure Python means clone-and-restart is the whole install.

Common issues

  • hash_ error: key never written or mistyped. Matching is exact, spaces and case included.
  • Fill the key for every output you actually read. An empty _key means that output is never produced, so wiring anything into it errors on a missing output.
  • Don't key a disconnected input - it stores None and can clobber a real value under that name.

Beta pack, honest warning, and a genuinely useful shape if you're passing one value along while squirreling away two others.

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

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