ComfyUI Node

Highway

The overkill pipe that declutters a monster workflow

By Trung0246·Created 3 years ago·Updated 2 years ago· 137
Highway
  • _way_in
  • _way_out
_query>data; <data

Highway is the flagship node of ComfyUI-0246, and the author is disarmingly honest about it: "yet another implementation but overkill version of pipe and reroute." It's a data bus. You bundle any number of named values into one HIGHWAY_PIPE wire, drag that single wire across the canvas, and unpack the values on the other side - instead of threading a dozen separate connections around your graph.

Here's the mental model the author himself uses: Highway is a train station where every person holds a ticket for a specific gate. Each named value goes in through its own gate and comes out at the matching gate, no matter how many stops the pipe makes. If you've got a big workflow with the same checkpoint, VAE, clip, and latents feeding ten different places, one Highway pipe replaces ten walls of spaghetti.

The _query syntax (this is the whole node)

_query is a string with the default >data; <data:

  • >name - an input lane. A pin appears, and whatever you wire in gets stored under name.
  • <name - an output lane. A pin appears that serves back whatever is stored under name.
  • ; separates multiple declarations: <model; <vae; <clip.
  • Backticks escape names with spaces or special characters: >`my data`.
  • !name - an output that also deletes its value after being read. The source marks this as currently broken thanks to how ComfyUI updates nodes, so don't build on it.

Right-click the node for quick actions, including auto-filling _query from connected pins. Each input you add gets packed into an internal RevisionDict keyed by name (with its Comfy type), and each output looks its name up and type-checks before handing it over - a mismatch raises a clear error.

The inputs and outputs

  • _query - the routing string above. This is the only thing you'll edit, and it's where 90% of your mistakes will live.
  • _way_in (optional) - a HIGHWAY_PIPE from another Highway, so lanes carry through chains of nodes.
  • _way_out - the HIGHWAY_PIPE, plus one named output pin per <...> lane.

Pair it with the pack's CastReroute (a reroute that lets you set the exact wire type) and you can route Highway lanes into other packs cleanly. The author also recommends cg-use-everywhere for fancier routing.

How to install it

ComfyUI Manager → search "ComfyUI-0246", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Trung0246/ComfyUI-0246

restart, done. No models to download; the whole pack is graph logic.

Common issues & troubleshooting

Recursion error / ComfyUI hangs. The source comment is blunt: "input and output of the same Highway node must not be connected, including indirect connection. Else will be recursion error due to how ComfyUI execute nodes (trust me I tried)." No cyclic paths through a Highway, ever.

"Output ... is not defined or is not of type ..." You wrote a <> lane whose value was never fed in, or the input's actual type doesn't match the pin you wired it to. Check that every <name> has a matching >name upstream.

A workflow that worked last week now errors after a ComfyUI update. The pack's README warns that Highway's type-tracking changed between versions; the migration path is to copy the _query string, create a fresh Highway, paste it, and reconnect. Highway's a stable idea but the pack has been quiet since early 2025 - updates to ComfyUI can and do shake it.

One honest word of caution. Pipes that hide data flow are a genuine point of tension in this ecosystem - the "Anything Anywhere" style of magic routing drew a visible community backlash for making workflows impossible to debug. Highway is much better behaved than that (you can always see the lanes in _query), but it still hides what's on a wire. Use it where it buys you readability; drop a 0246.Beautify or 0246.Meta on the end when you're not sure what a pipe actually contains.

Category0246

Inputs (2)

NameTypeDefaultDescription
_querySTRING>data; <data
_way_inoptHIGHWAY_PIPE

Outputs (1)

NameTypeDescription
_way_outHIGHWAY_PIPE