ComfyUI Node

Auto Seed

The node that finally gives you a fresh seed every queue

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Auto Seed
    • seed
    reset_seed-1

    You know the dance. KSampler has a seed widget with "randomize" on it, so every run should be different - except you ran the workflow ten times and got ten near-identical images because the seed didn't actually change. Auto Seed exists to make that pain disappear: it hands you a fresh, unpredictable seed on every single queue, and you just wire it into your KSampler.

    The name undersells it. It's not a randomizer with a toggle you can forget to flip; it's a node that is designed to produce a new value each execution, with zero interaction from you. For variation workflows - batch looks, prompt roulette, "generate until something good" - this is the one I'd reach for over a plain seed widget, because there's nothing to forget.

    How it works

    Under the hood Auto Seed keeps a private counter that lives for the life of the ComfyUI session. Every time the node executes it increments that counter, seeds Python's random with it, and returns a random 64-bit integer. Because the node reports that its output changes on every run (IS_CHANGED returns "always changed"), ComfyUI re-executes it each time you hit Queue - no caching, no stale seeds, no "randomize" toggle to babysit.

    One consequence worth knowing: the counter starts at zero when ComfyUI starts. So the first seed after a fresh launch is reproducible in a narrow sense (same counter, same seed), and then it wanders off into genuine randomness. If you need to nail a specific seed for a rerun, that's what reset_seed is for.

    The inputs that matter

    There's only one, and it's optional:

    • reset_seed (INT, default -1) - set this to 0 or higher and the internal counter jumps to that value instead of incrementing. It's a way to force a deterministic stretch: reset to a fixed number and every subsequent run's seed is a predictable function of it.

    The single output is seed (INT) - the 64-bit integer that feeds straight into a KSampler's seed input. That's the whole circuit.

    Installing it

    Auto Seed ships in the ComfyUI-TinyBee pack, which is a small MIT-licensed utility collection with no model downloads and nothing heavy to install. Easiest path is ComfyUI Manager:

    1. Open Manager → Custom Nodes Manager.
    2. Search "ComfyUI-TinyBee" (by TinyBeeman) and hit Install.
    3. Restart ComfyUI.

    Prefer the terminal? That works too:

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

    Restart, and the node shows up under the 🐝TinyBee/Util menu. The pack's requirements.txt lists pillow and jsonata; you only need jsonata if you ever use its JSON Parser node - Auto Seed itself runs on nothing but the Python standard library that ComfyUI already provides.

    Common issues

    The realistic gotchas here are subtle. First, the counter is session-local and not thread-safe, so if you run multiple concurrent queues in one ComfyUI instance you may see seeds that skip or collide - an edge case, not something most people hit. Second, remember this node is stateless across restarts: if you reboot ComfyUI mid-project, the seed sequence restarts from the same place it began, which can make a "new random" run look oddly familiar. Neither is a bug in the node; both fall out of how it's built. If you want a different flavor of chaos, the pack also has an "Iterate Seed" node that walks seeds up by one - Auto Seed is the sibling you grab when you want full randomness instead.

    Category🐝TinyBee/Util

    Inputs (1)

    NameTypeDefaultDescription
    reset_seedoptINT-1-1–18446744073709550000

    Outputs (1)

    NameTypeDescription
    seedINT