Motorway 1x2
The motorway's echo-and-read node
- MOTORWAY ππ¨
- ANY_(A)
- MOTORWAY ππ¨
- ANY (A)
- ANY (B)
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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| ANY_(A)opt | * | β | |
| ANY_(A)_keyopt | STRING | β | |
| ANY_(B)_keyopt | STRING | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |
| ANY (A) | * | β |
| ANY (B) | * | β |