Ordered Passthrough
Force execution order on a graph that forgot to care
- data
- wait_for
- data
Most ComfyUI breakage isn't a bad model - it's execution order. ComfyUI runs nodes in dependency order, so if nothing actually depends on a node, it runs whenever it feels like it, and two independent branches can race. Ordered Passthrough is the pack's fix: a chain of pass-through nodes that does nothing to your data but forces "node 1 runs before node 2 runs before node 3."
How it works
Each node has two inputs in the schema: data (required, * - anything) and wait_for (optional, *). The Python side is embarrassingly simple: data comes in, data goes out unchanged; wait_for exists purely to create a dependency edge. The cleverness lives in the JS:
- An
orderwidget (1–99) is added to every instance, and a badge showing the number is drawn on the node. - The
wait_forinput is hidden - you never wire it by hand. - Whenever the graph changes, the extension sorts all Ordered Passthrough nodes by
orderand auto-wires each one'sdataoutput into the next node's hiddenwait_forinput. Node 1's output feeding node 2's wait_for creates exactly the dependency ComfyUI needs: node 2 can't start until node 1 finished.
So you place a few of these, set their orders, and the graph gets a forced serial chain - while a dashed line is drawn between consecutive nodes so you can see the ordering. Because the wiring is regenerated automatically, it survives save/reload and node reordering.
The practical pattern
The classic use: you have a slow, unconnected branch - say, a preprocessing or dataset-prep node that nothing downstream references - and a main generation path. You want the prep finished before generation starts, but there's no data link between them. Drop an Ordered Passthrough on the prep branch's end (order 1) and one on the generation path (order 2), feed each one any value from its branch, and the chain forces prep to complete first. The data you feed it is just a token; it comes out the other end unchanged and usually goes nowhere.
Where people get tripped up: the order is the only thing that matters, so give your chain explicit 1-2-3 values rather than leaving everything at default 1 (ties break by node ID, which you can't see at a glance). And remember these nodes create ordering, not parallel execution guarantees - they serialize, which is what you asked for when you added them.
Install
Part of ComfyUI-JSON-Dynamic. ComfyUI Manager → search JSON Dynamic Loader, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-JSON-Dynamic.git
# restart ComfyUI
No dependencies beyond the bundled JS.
Verdict
If you've never had an ordering headache, this node will look pointless - it literally passes data through. The moment two independent branches misbehave because of race conditions, you'll understand exactly why it exists. It's a small, sharp tool for a specific pain, and it does the job without asking you to understand LiteGraph's internals.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| data | * | — | |
| wait_foropt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| data | * | — |