ComfyUI Node

MotorwayStr

A single-line string that knows the pipe

By agilly1989Β·Created 2 years agoΒ·Updated about a year agoΒ· 7
MotorwayStr
  • MOTORWAY πŸšŒπŸ’¨
  • MOTORWAY πŸšŒπŸ’¨
  • STRING
β—„STRINGβ–Ί
β—„keystringβ–Ί

MotorwayStr is the pack's single-line string primitive, and like its siblings it doubles as an on-ramp: put a string on the Motorway under a key, hand the bag along, and give you the string back as an output.

The inputs are exactly what the name promises. A required STRING widget (default empty) is the value you're carrying. The optional MOTORWAY input carries the pack's signature tooltip - "If not connected will act as a 'Motorway Start' node" - so this node can start a fresh pipe or join an existing one. And a key text field, default string, is the name the value rides under. Outputs are the MOTORWAY and the STRING.

The mechanism is the pack's single trick, applied: the Motorway is a dict-like bag of key→value pairs stored under sha256 hashes, cloned at every hop so branches stay independent. This node does one update(key, value) and passes the bag on. Any Motorway output downstream with a key field set to string will hand you this exact text back - that's how a positive prompt, a filename prefix, a wildcard path, or a LoRA trigger word can travel the whole graph without a wire crossing the canvas.

The string-vs-string-multi distinction is the only real choice here. MotorwayStr is a single-line field; its sibling MotorwayStrMulti gives you a multiline box. For a prompt or a filename, single-line MotorwayStr is usually what you want. The defaults even match - both store under string - so if you ever swap one for the other mid-project, any downstream reads by that key keep working. That's a nice touch of interoperability you don't always get in this pack.

Install is the pack standard:

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

restart ComfyUI, or search "agilly1989" in ComfyUI Manager. No models, no pip dependencies - pure Python, nothing to fetch.

Shared family gotchas, stated once: keys are exact and case-sensitive - string and String are different keys, and the second will throw 'MotorwayClass' object has no attribute 'hash_' when read. And remember what you're running: a one-person beta whose README opens with "IF THINGS BREAK ITS BECAUSE I BROKE IT." For carrying one short string on a pipe, it does the job with zero ceremony, which is more than you can say for most of the pack's showier nodes.

Categoryagilly1989 Nodes/Utilities/Primitives/Strings

Inputs (3)

NameTypeDefaultDescription
STRINGSTRINGβ€”
MOTORWAY πŸšŒπŸ’¨optMOTORWAY πŸšŒπŸ’¨Optional Input. If not connected will act as a "Motorway Start" node
keyoptSTRINGstringβ€”

Outputs (2)

NameTypeDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
STRINGSTRINGβ€”