Nodes/ComfyUI-LogicUtils/Uniform Random Choice
ComfyUI Node

Uniform Random Choice

A poor man's wildcard, one string wide

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Uniform Random Choice
    • STRING
    input_stringa$b$c
    separator$
    seed0

    You give this node a string with a few options packed into it, separated by a delimiter, and it randomly picks one out. The default example - a$b$c split on $ - tells you the whole syntax: swap in your own list, like red$blue$green, keep the separator, and each run draws one of the three with equal odds. It's a compact stand-in for a proper dynamic-prompts / wildcard extension, done with a single text field instead of a separate syntax or file.

    Part of aria1th's ComfyUI-LogicUtils, a small pack of logic, random, and string-utility nodes. Same GitHub account behind the Illustrious XL checkpoints under the AngelBottomless handle - a different project, and one that's had a full wildcards pack (ComfyUI-Wildcards-rework) shipped right after this one, before the author moved off image-generation work entirely. This particular pack's last push was 2026-01-21.

    Inputs and outputs

    • input_string - your list of choices, joined by the separator. Default a$b$c.
    • separator - what splits them apart. Default $. Pick something that definitely won't appear inside any of your actual choices - if one of your options contains $ and your separator is also $, it'll get split in the middle. Switch to | or another character your content won't collide with.
    • seed - an integer, default 0, controlling which choice gets picked.
    • Output - a single STRING: whichever entry got selected.

    Because the field is literally called seed, ComfyUI's frontend automatically attaches the familiar randomize/increment/fixed control to the widget - the same one on a KSampler - so setting it to randomize gets you a fresh pick every queue without any extra wiring.

    Where you'd actually use it

    Quick, lightweight randomization of a single value - pick a random background, pose word, or style tag from a short list, without installing a full wildcard system. It's genuinely handy for exactly that scale of problem; if you need nested wildcards, weighted choices, or lists pulled from separate files, this isn't the tool (the same author's separate wildcards pack is closer to that, if you go looking).

    Installing it

    ComfyUI Manager → search ComfyUI-LogicUtils → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    No model files. No real dependencies either, by community account - a r/StableDiffusion thread on lightweight ComfyUI logic recommended this pack over bulkier, less-maintained ones (WAS Node Suite, Impact Pack) specifically because it has none. The README's own auto-install hook stays off unless you opt in (COMFYUI_LOGICUTILS_AUTO_INSTALL=1; force it off with COMFYUI_LOGICUTILS_SKIP_INSTALL=1).

    Common issues

    The one real trap is separator collision - covered above, and worth double-checking if your choices ever end up shorter or garbled-looking than expected. It usually means one of your entries contains the separator character and got cut in half.

    The other thing to know: seed and inputs both have to match for a reproducible pick - change input_string or separator and the same seed can land on a different result, since the underlying draw depends on the whole set of choices, not just the seed number. And as with the rest of this pack, it's stable but not under active development - the last commit was January 2026.

    CategoryLogic Gates

    Inputs (3)

    NameTypeDefaultDescription
    input_stringSTRINGa$b$c
    separatorSTRING$
    seedINT00–9223372036854776000

    Outputs (1)

    NameTypeDescription
    STRINGSTRING