Nodes/ComfyUI-off-suite/Random Seed from List
ComfyUI Node

Random Seed from List

Pick a Seed From Your Shortlist of Good Ones

By Off-Live·Created 3 years ago·Updated 2 years ago· 0
Random Seed from List
    • INT
    seed_string

    Every generation dies on a bad seed now and then, and every regular has a shortlist of seeds that just work for a given setup. This node is that list, turned into a node: you type in your favorite seeds, it picks one at random and hands it to the KSampler. That's the whole thing - and it's genuinely all it needs to be.

    It's part of ComfyUI-off-suite, Off-Live's small utility pack. Random seeds are a one-liner in most node packs, but if you're already running off-suite for its face-crop nodes, this saves installing a second pack for something this trivial.

    What you plug in

    One input, one output:

    • seed_string - your seeds as comma-separated integers. 42, 1234, 777, 90210. It splits on commas (whitespace around numbers is tolerated, since int() handles it), converts each token, and picks one with random.choice.
    • Output is an INT - wire it straight into a KSampler's seed input.

    The behavior that matters

    The node overrides IS_CHANGED to return a random value, which is ComfyUI-speak for "always re-run me." Feed it and re-run the queue, and you get a different random pick each time, not a cached result. That's exactly what you want from a random-seed node, and it's what most hand-rolled equivalents get subtly wrong.

    Two honest limitations:

    • Non-numeric tokens throw. "42, a, 13" crashes with a ValueError at queue time. Keep the list clean.
    • It's a random pick, not a sequential one. If you want to iterate through your list in order - run seed 1, then seed 2, then seed 3 - this node won't do that; you want a seed-cycling or loop node instead.

    When you'd actually use it

    Two workflows make this shine. Batch exploration: you've narrowed your setup down to a dozen seeds that produce good bases, and you want to roll one per run to see variations. And "keep it interesting" production: you want reproducibility from a curated set rather than a uniform random draw across the whole 64-bit space - the difference between "same three layouts rotated" and "absolute chaos."

    For everything else, the built-in random seed (-1 in a KSampler) is fine. This node exists for when you want randomness within bounds.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Off-Live/ComfyUI-off-suite
    # or: ComfyUI Manager → search "ComfyUI-off-suite"
    

    No extra dependencies, no model files. It's one small class in the pack's misc.py. Same caveat as the rest of the pack: the repo's been quiet since mid-2024, so don't expect updates - but for a node this size, "it still works" is a perfectly good maintenance plan.

    CategoryOFF

    Inputs (1)

    NameTypeDefaultDescription
    seed_stringSTRING

    Outputs (1)

    NameTypeDescription
    INTINT