ComfyUI Node

Motorway 1x2

The motorway's echo-and-read node

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

The Motorway 1x2 is where the motorway's write/read duality gets easy to see in one node: one value goes in, two values come out, and the split between them shows you exactly how the pipe thinks. It's part of agilly1989/ComfyUI_agilly1989_motorway, the author's keyed-pipe system for ComfyUI, and in the pack's own Example.json it's used with the keys samples and vae - write your latents in under "samples", read both the latents back and the VAE out of the bag.

That's the pattern. The single ANY_(A) input is a write: connect a value, name it in ANY_(A)_key, and it lands on the bus under that name. Output ANY (A) reads back under the same key, so it echoes the value you just wrote - useful when you want the bus to carry a value and still have a live wire here for the local node. Output ANY (B) reads under ANY_(B)_key, a different name, so it pulls whatever was stored upstream under that key. One node, one write, two different reads.

How it works. The motorway is a MotorwayClass that stores values under attribute names derived from the sha256 of your key strings, and every ramp clones the bag before passing it on. Keys are exact and case-sensitive: vae and VAE are two different slots. The 1x2 clones the bag after writing your input, then reads both outputs from that snapshot, so A and B are always consistent with each other.

Inputs and outputs that matter. The required MOTORWAY πŸšŒπŸ’¨ input must be live - chain this after a MotorwayStart or another ramp. ANY_(A) in, ANY (A) and ANY (B) out - all wildcards, any type. The two key fields are the whole interface: ANY_(A)_key names the write and the echo, ANY_(B)_key names the second read. In the example workflow, "samples" in A means the latents ride the bus under that name, and "vae" in B pulls a VAE that a loader node stored earlier.

Install. ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or:

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

Restart ComfyUI. Pure Python, nothing extra to install.

Common issues. Output B with a key that no upstream node wrote throws the pack's signature 'MotorwayClass' object has no attribute 'hash_' error. A blank ANY_(B)_key means output B simply doesn't exist - the tuple shrinks and ComfyUI's fixed output count gets grumpy. And this is an openly beta pack: the README begins "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION", so treat every update as a potential surprise.

Categoryagilly1989 Nodes/Motorways

Inputs (4)

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

Outputs (3)

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