ComfyUI Node

Junction

The original name for ComfyUI-0246's sequential data packer

By Trung0246·Created 3 years ago·Updated about a year ago· 137
Junction
  • _junc_in
  • _junc_out
_offset;

This page is the legacy slug for Junction. The node was originally registered under the bare class name Junction; today it ships as 0246.Junction with the same inputs, outputs, and behavior. If you're loading an old workflow that references the Junction class and ComfyUI calls it missing, that's why - swap in the 0246. version and re-copy the _offset string.

So what is a Junction? It's the 0246 pack's other pipe, and it's the exact opposite philosophy to Highway. Where Highway is a named bus - each value carries its own ticket to its own gate - Junction is a sequence: values are packed one after another, grouped by type, and you read them back by telling the node which position of each type you want. The author's train-station metaphor, straight from his Reddit thread: "Highway works like each person holds a ticket to go through a specific gate for any station, while Junction forces each passenger type to go through a specific gate at any station."

Concretely: pack a MODEL, then two LATENTs, then a VAE into one JUNCTION_PIPE. On the other side, the second LATENT is the one at index 1. _offset is the string that controls which index each type reads from.

The inputs and outputs

  • _offset - default ";" (no offset). Syntax per the docs: type,1 sets that type's index to 1, type,+2 increments it, type,-2 decrements, and multiple offsets are separated by ; - e.g. LATENT,1; MODEL,0; VAE,-1. The offset is persistent and carries through linked Junctions, which is how you can skip the same position across a chain.
  • _junc_in (optional) - a JUNCTION_PIPE from another Junction.
  • _junc_out - the JUNCTION_PIPE, plus one output pin per type you've packed (pins auto-expand as you connect).

A caveat from the source: ask for an offset that's out of range and you get an exception (Offset ... is too large), which is a blessing - silent index misreads would be impossible to debug.

Why use it at all

Junction shines when you're moving a bundle of same-typed values around and want to pull them out in order - for example collecting several latents or conditionings and handing them to a consumer one at a time. It's also the basis of the pack's batching (0246.JunctionBatch) and its scripting (ScriptNode's pin_junction mode). Honestly, most users reach for Highway first; Junction is for when your data is naturally a typed queue rather than a set of names.

How to install it

The pack as a whole: ComfyUI Manager, search "ComfyUI-0246", or

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

then restart. No models. For the full mechanism, the JunctionBatch variant, and the migration warning about _offset strings changing between pack versions, see the current 0246.Junction article.

Category0246

Inputs (2)

NameTypeDefaultDescription
_offsetSTRING;
_junc_inoptJUNCTION_PIPE

Outputs (1)

NameTypeDescription
_junc_outJUNCTION_PIPE