Nodes/ComfyUI-SuperNodes/🐧 List Randomizer
ComfyUI Node

🐧 List Randomizer

Random prompts without learning wildcard syntax

By sonnyboxΒ·Created 11 months agoΒ·Updated 4 days agoΒ· 12
🐧 List Randomizer
    • text
    β—„textβ–Ί
    β—„seed0β–Ί

    The 🐧 List Randomizer is the smallest useful node in the pack and one of the ones I'd actually reach for. You type a comma-separated list, it hands back one random item. blue, red, green β†’ one of the three. That's the whole node, and that's the appeal - no wildcard engine, no file picker, no syntax to learn.

    It slots straight into prompt variation work. Loop a batch with cinematic, documentary, handheld in front of your positive, and every frame rolls a different look. Pick a random style, character, or aspect ratio across runs. You can chain it into a normal CLIP Text Encode and get prompt roulette for free, which is a lot lighter than installing a wildcard suite for one-off randomness.

    How it works

    Under the hood it's exactly as simple as it looks:

    items = text.split(",")
    items = [item.strip() for item in items]
    random.seed(seed)
    result = random.choice(items)
    

    Comma-split, whitespace trimmed, random.choice on a seeded RNG. It's literal string handling - there's no escaping, no nesting, no file lookup. What you type is what you roll from.

    Two inputs matter:

    • text - your comma-separated list.
    • seed - with control after generate support, so you can set it to Randomize and get a fresh pick on every queue, or fix it to reproduce a specific choice.

    Output is a single text string that feeds anywhere a string goes.

    Installing it

    It's part of the ComfyUI-SuperNodes pack (GitHub: sonnybox/ComfyUI-SuperNodes) by SuperCC. In ComfyUI Manager, search SuperNodes, install, restart. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sonnybox/ComfyUI-SuperNodes
    # restart ComfyUI
    

    Only dependency is matplotlib; no models, no keys. It does need a reasonably current ComfyUI, because the pack uses the newer comfy_api extension API - on old builds none of the nodes show up.

    The traps

    Three, and they're all about the comma-split being dumb on purpose. First, you can't put a comma inside an entry - night, cyberpunk, Blade Runner, 1982 gives you five entries, not three. Second, blank items are kept as valid choices: a trailing comma adds "" to the pool, and since the code explicitly keeps blanks, you can genuinely roll an empty string. Third, same seed = same answer. If you keep getting the same word, you've left the seed fixed. This is not a wildcard system and it won't do {a|b} style nesting - for that, install an actual wildcard pack. For "give me one thing from this list," it's perfect.

    CategorySuperNodes/Tools

    Inputs (2)

    NameTypeDefaultDescription
    textSTRINGβ€”
    seedINT00–9007199254740991β€”

    Outputs (1)

    NameTypeDescription
    textSTRINGβ€”