Nodes/comfyui_gr85/Seed Based Output Selector
ComfyUI Node

Seed Based Output Selector

Picking one of up to 10 strings, tied to a seed

By veighnsche·Created 2 years ago·Updated 12 days ago· 1
Seed Based Output Selector
    • STRING
    seed_number0
    input_1
    input_2
    input_3
    input_4
    input_5
    input_6
    input_7
    input_8
    input_9
    input_10

    Straight from the README: this node selects one string out of up to 10 inputs, based on a seed - only the inputs you've actually connected (non-None) are considered, and the seed picks among them by modulo. In plain terms: wire up however many prompt variants you want (2, 5, 10, doesn't matter), and the node deterministically rotates through just the ones you connected as seed_number changes.

    Why you'd reach for it. The obvious use is A/B/C-testing prompt phrasing across a batch without hand-editing text between runs - wire three or four different subject descriptions into input_1 through input_4, tie seed_number to your batch index or your image seed, and each generation in the batch gets a different, reproducible variant. It's a lighter-weight alternative to wildcard syntax when your options are full sentences rather than single words, and you want each option laid out explicitly rather than crammed into {a|b|c} braces.

    Inputs and output. seed_number (INT, required) is the selector. input_1 through input_10 (all optional STRING, default null) are your candidate strings - leave as many unconnected as you like; the node only considers the ones with a value. Output is a single final_output - the chosen string, ready to feed into a CLIPTextEncode or wherever your prompt normally lands.

    The mechanism detail worth internalizing. Because it skips unconnected inputs when computing the modulo, connecting 3 of the 10 sockets means the selection cycles through those 3, not through 10 slots with 7 empty gaps. That's the sane behavior, but it also means the number of inputs you wire changes how sensitive the selection is to seed_number - with only 2 or 3 connected, a wide range of seed values collapses onto the same handful of picks, which is expected, not a bug; if you want more visible variety, connect more inputs.

    Installing it. No external dependencies - pure string selection logic. Search "comfyui_gr85" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/veighnsche/comfyui_gr85
    

    Restart ComfyUI.

    One genuinely easy mistake. seed_number is its own separate socket, entirely independent from whatever seed you feed your KSampler. If you want the prompt-variant selection to move in lockstep with your image's randomness - so seed 42 always gets both the same picked prompt and the same generated image - you have to wire the same seed value into both explicitly. Nothing links them automatically, and it's an easy thing to assume works out of the box until you notice your prompt selection isn't changing while your image seed is.

    CategoryGR85/Prompt/Selection

    Inputs (11)

    NameTypeDefaultDescription
    seed_numberINT00–18446744073709550000
    input_1STRING
    input_2STRING
    input_3STRING
    input_4STRING
    input_5STRING
    input_6STRING
    input_7STRING
    input_8STRING
    input_9STRING
    input_10STRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING