Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Random String Selector (20)
ComfyUI Node

EmAySee Random String Selector (20)

Twenty prompt slots, one randomly chosen — the 20-way picker

By EmAySee·Created about a year ago·Updated 5 months ago· 3
EmAySee Random String Selector (20)
    • selected_string
    ◄seed0►
    ◄string_1—►
    ◄string_2—►
    ◄string_3—►
    ◄string_4—►
    ◄string_5—►
    ◄string_6—►
    ◄string_7—►
    ◄string_8—►
    ◄string_9—►
    ◄string_10—►
    ◄string_11—►
    ◄string_12—►
    ◄string_13—►
    ◄string_14—►
    ◄string_15—►
    ◄string_16—►
    ◄string_17—►
    ◄string_18—►
    ◄string_19—►
    ◄string_20—►

    A twenty-slot prompt roulette. You paste up to twenty different strings - subject variations, style swaps, negative-prompt candidates - and the node picks one at random for each run and hands it to your CLIP encoder. It's the heavyweight of the pack's string-selector family, and the one you want when "random prompt" means a real pool, not a coin flip between two.

    How it works

    Every input is optional: string_1 through string_20. Leave any slot empty and it's simply not in the pool - so you can start with four filled and grow to twenty without reconfiguring anything. A seed input controls the pick, so the same seed + same pool gives the same winner, which is handy when you want to reproduce an exact run.

    Output is selected_string (STRING), a single string you wire into a CLIP Text Encode (or a text combine, or a filename template - wherever a string goes).

    The seed nuance

    The seed widget is required, and it does gate the selection - this isn't the "every run is new" roulette you get elsewhere in this pack. Set the seed and randomize it on the widget to get a fresh pick per run; leave it fixed and you'll get the same slot forever. That trips people up in the other direction: they expect randomness and get the same string five runs in a row because the seed never changed. ComfyUI's "randomize" button on the widget fixes it in one click.

    Where it fits

    This is the classic "wildcard without a wildcard file" pattern. Instead of maintaining a wildcard text file and a wildcard processor, you type your variations directly into the node. Fewer moving parts, and you can see the whole pool on screen at once. The trade-off is 20 hard-coded slots - for a truly enormous pool you'd still want a real wildcard system, and this pack's other pickers are better when you only need 2–4 options.

    Installing it

    From ComfyUI_EmAySee_CustomNodes, via ComfyUI Manager (search the pack title) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
    # restart ComfyUI
    

    It's under EmAySee/Utils. No dependencies, no model files - it's random.choice over whatever you typed.

    CategoryEmAySee/Utils

    Inputs (21)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000—
    string_1optSTRING—
    string_2optSTRING—
    string_3optSTRING—
    string_4optSTRING—
    string_5optSTRING—
    string_6optSTRING—
    string_7optSTRING—
    string_8optSTRING—
    string_9optSTRING—
    string_10optSTRING—
    string_11optSTRING—
    string_12optSTRING—
    string_13optSTRING—
    string_14optSTRING—
    string_15optSTRING—
    string_16optSTRING—
    string_17optSTRING—
    string_18optSTRING—
    string_19optSTRING—
    string_20optSTRING—

    Outputs (1)

    NameTypeDescription
    selected_stringSTRING—