ComfyUI Node

Sequence

Make ComfyUI do things in the order you actually meant

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Sequence
    • passthrough
    passthrough
    dependency

    Here's a ComfyUI truth most beginners discover the hard way: nodes run when their inputs are ready, not in the order you drew them. That's usually fine - it's how the graph model works - but every so often you need something to actually happen after something else, even when the second thing doesn't depend on the first's data. That's what Sequence is for.

    Concretely: you have a side-effect node like a file saver or a text exporter that must finish before the next step reads its file. The next step doesn't consume the saver's output, so ComfyUI may happily run it first. Sequence forces the issue by making one branch wait on another, even though it carries no meaningful data between them.

    How it works

    Sequence is deliberately dumb, which is the point. It takes two inputs and returns one of them:

    • passthrough (STRING) - whatever string you route in here comes back out the passthrough output, completely untouched.
    • dependency (STRING) - this is the traffic cop. By wiring the thing that must run first into this input, you create a real data dependency: ComfyUI can't execute Sequence until dependency is ready.

    Wire it like this: run your side-effect node into dependency, then feed passthrough with whatever downstream value you actually care about. The output passthrough carries that value onward, and because Sequence had to wait for the dependency to finish, everything downstream is now correctly ordered.

    It's the same trick as the old "connect a dummy wire so ComfyUI waits" hack, except explicit and self-documenting. You won't need it every day, but when a save-then-process workflow runs out of order and produces an empty file, Sequence is the clean fix.

    Installing it

    Sequence comes from ComfyUI-TinyBee, a small MIT-licensed utility pack with zero model downloads. Through ComfyUI Manager:

    1. Manager → Custom Nodes Manager.
    2. Search "ComfyUI-TinyBee" and install.
    3. Restart ComfyUI.

    Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
    

    Restart and you'll find Sequence under 🐝TinyBee/Util. The pack's only non-standard dependency, jsonata, is for its JSON Parser node; Sequence itself runs on pure standard library.

    Gotchas

    The honest caveat: this is a graph-ordering hack, not a scheduling guarantee. It works because ComfyUI honors data dependencies for execution order, which it does reliably - but it doesn't make Sequence "prettier" or add any real functionality. Also keep the STRING type in mind: if the value you're passing through is an image or a number, you'll need to cast it to a string first and cast it back downstream. If your real problem is that two nodes genuinely share data, wire the data directly instead - Sequence is for ordering, not for routing.

    Category🐝TinyBee/Util

    Inputs (2)

    NameTypeDefaultDescription
    passthroughSTRING
    dependencySTRING

    Outputs (1)

    NameTypeDescription
    passthroughSTRING