ComfyUI Node

Random Selector

Roll the dice on your prompts — and lock the keepers

By Ckrest·Created 8 months ago·Updated 4 months ago· 0
Random Selector
  • pool
  • selected
count1
frozenfalse
allow_duplicatesfalse
display

Random Selector is the heart of the comfyui-easy-randomize pack, and the pitch is the workflow the README leads with: Randomize → Preview → Freeze what you like → Iterate on the rest. Instead of hand-editing your prompt between every generation, you drop a few pools of options into the graph, let this node pick from them, and then freeze the picks that work while everything else keeps rolling. If you've ever caught yourself thinking "I don't know what I want, I just want a stack of variations," this is the node that node does that.

How it works

Give it a pool - a list of items, one per line, from the pack's Item Pool node - and it draws count items and joins them into a single comma-separated string. That string goes into the selected output, which you wire straight into your CLIP Text Encode or a string combiner. Easy part over.

The interesting part is the frozen checkbox and the display widget sitting next to it. The display field is where the node shows you what it just picked, and it doubles as the memory: when you check frozen, the node stops rolling and just re-emits whatever is in display. Because display is a normal widget, that value is saved inside the workflow JSON - so a frozen selection survives saving, sharing, and reloading. There's no hidden state to lose.

The flip side is what makes this genuinely random rather than ComfyUI-cached: when frozen is off, the node's IS_CHANGED returns NaN, which never equals itself, so ComfyUI is forced to re-execute it on every queue item. No seed, no repeats, no "why is it giving me the same thing."

The inputs that matter

  • pool (optional) - the only wire worth caring about. Feed it from Item Pool.
  • count - how many items to pick. One is the sane default for prompt slots.
  • allow_duplicates - off by default, which means you can't draw "blue, blue" from a short pool. Flip it on if you genuinely want repeats.
  • frozen - the killer feature. Check it on the pick you like, uncheck to re-roll.
  • display - leave it alone; it's the readout that also holds your frozen value.

The gotchas

There is no seed input, even though the pack's own QUICK_START guide keeps telling you to "change the seed." The shipped code rolls with Python's random unseeded, so the only reproducibility you get is frozen. Don't go looking for a seed widget that isn't there.

Also, the README says nodes live under an "Easy Randomize" category - the actual registered category is Local Custom/Selection. Check there first if the node doesn't show up where you expected.

How to install

The whole pack is pure Python stdlib plus ComfyUI's own SaveImage, so there are no pip dependencies and no model downloads - one of the least painful installs in the ecosystem. In a terminal:

cd ComfyUI/custom_nodes
git clone https://github.com/Ckrest/comfyui-easy-randomize.git

Restart ComfyUI. Or use ComfyUI Manager and search "comfyui-easy-randomize." That's the whole install.

Troubleshooting

  • "It outputs nothing." The pool isn't connected, or the pool has zero live items (everything commented out with # or blank).
  • "It keeps giving me the same pick." You're frozen. Uncheck frozen.
  • "It changed when I didn't want it to." Freeze the ones you like and only leave the experiment slots unfrozen. That's the workflow this pack was built around - freeze incrementally, never all at once, and you'll get the "change one variable at a time" discipline the community keeps preaching, except without you having to type a thing.

It's a small, niche pack from a solo dev, so don't expect a Reddit cult following to back it up - but for the randomize-and-freeze workflow specifically, this is the one node in the pack worth the install.

CategoryLocal Custom/Selection

Inputs (5)

NameTypeDefaultDescription
countINT11–100
frozenBOOLEANfalse
allow_duplicatesBOOLEANfalse
displaySTRING
pooloptPOOL

Outputs (1)

NameTypeDescription
selectedSTRING