ComfyUI Node

Motorway 3x4

Motorway 3x4

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

Motorway 3x4 is the "three in, four out" junction of the agilly1989 Motorway pack - three values join the bus and four named values come off it, three echoing what you put in and one a free tap into something already stored. It's the smallest fan-out of the three-input row, and it's a good default when three live values need to travel forward and one extra read needs to happen at the same spot.

The Motorway is a beta "pipe" implementation by solo dev agilly1989, the same concept as rgthree's Context nodes and Impact Pack pipes: bundle values onto one wire instead of dragging each across the canvas. The difference is the transport - a MotorwayClass bus object carried on the MOTORWAY πŸšŒπŸ’¨ connection, which every node takes as its required input and returns as its first output so the route continues. Start at MotorwayStart, then chain junctions; the pack's Example.json shows the pattern.

How it works

Same key mechanism as the rest of the pack. Values into ANY_(A), ANY_(B), ANY_(C), each named in a _key box, all three stored on the bus. Because outputs outnumber inputs, the node has four key slots - ANY_(A)_key through ANY_(D)_key:

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

Slots A, B, C are double-duty: each names its input and reads its own output. Slot D has no input behind it, so it's a pure tap - type any key that's on the bus and output D delivers it. That's the spare lane this node offers over a 3x3: carry three things forward while also surfacing, say, a seed that a write-only node parked earlier. One extra read, no extra node.

Keys are sha256-hashed into hash_… attributes internally - hence the cryptic 'MotorwayClass' object has no attribute 'hash_' when you reference a key that was never written. And the bus isn't a log: writing the same key again anywhere overwrites the earlier 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 clone-and-restart is everything.

Common issues

  • hash_ error: the key was never written or is spelled differently upstream. Keys match exactly, case and spaces included.
  • Every _key box must be filled; an empty one means that output is never produced and wiring anything into it errors on a missing output.
  • Leave the read-only slot (D) disconnected. Keying a slot with no input stores None and can erase a value you wanted to keep.

Beta pack, author's honesty included. For "three forward, one tap," 3x4 is a compact, tidy fit.

Categoryagilly1989 Nodes/Motorways

Inputs (8)

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

Outputs (5)

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