Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Random Integer From List
ComfyUI Node

EmAySee Random Integer From List

The dumbest possible random integer node — and sometimes that's exactly right

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Random Integer From List
    • RANDOM_INTEGER
    integer_list_str1, 5, 10, 25

    Every once in a while you just need "a random one of these four numbers, I don't care which." That's this node. You type a comma-separated list of integers, it picks one at random and hands you the result as an INT. No seed, no ranges, no toggles, no options. It's the baseline model of random-integer nodes, and for variety runs it's plenty.

    How it works

    The whole thing is one input and one output:

    • integer_list_str - a plain string like "1, 5, 10, 25". It splits on commas, tries to parse each entry as an integer, and throws away anything that doesn't parse (with a console warning). Then it calls random.choice() on what's left.

    That's it. Output is RANDOM_INTEGER, an INT you can wire into a seed, a LoRA index, a prompt state switch, whatever takes an integer.

    Where it fits

    This is a "variety" node. Stick it in front of a seed input and every run gets a different seed with zero mental overhead. Pair a few of them with a string selector and you've got a crude prompt-roulette workflow. It's the kind of node you'd normally reach for a bigger utility pack for, and this one does it with no extra install dependencies.

    The catch: no reproducibility

    There's no seed input. Every execution rolls fresh from Python's global RNG. That's fine when you want randomness, but the moment you need "same selection again for this same seed," this node can't do it. If that matters, use the pack's other random-int node, EmAySee_RandomIntFromList, which takes a seed and even supports ranges like 4-6. If no valid integers are found, the node silently returns 0 rather than erroring - a dead-simple way to get a run that quietly does nothing interesting, so double-check your commas if output is flat.

    Installing it

    Same pack as always - this is one of the 60+ nodes in ComfyUI_EmAySee_CustomNodes. Install via ComfyUI Manager (search the pack title) or:

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

    It lives under EmAySee_Utils in the add-node menu. No dependencies, no model files, just Python's random module.

    Bottom line

    It's a one-line utility dressed as a node. If you need reproducibility, step up to the seeded sibling; if you just need a random integer that stays random, this is the least-friction option in the pack.

    CategoryEmAySee_Utils

    Inputs (1)

    NameTypeDefaultDescription
    integer_list_strSTRING1, 5, 10, 25

    Outputs (1)

    NameTypeDescription
    RANDOM_INTEGERINT