LogicUtil_Uniform Random Choice
Pick a random option from a list — reproducibly, with a seed
- STRING
Randomness in ComfyUI is only useful if you can turn it off. LogicUtil_Uniform Random Choice understands that: it picks one item from a list of options, and because every pick is seeded, the same seed always gives you the same option. It's part of the LogicUtil subpack of ComfyUI-JDCN, and it's the node to reach for when you want variation in your prompts or LoRA choices without losing the ability to reproduce a run.
How it works
You give it an input_string like cinematic$moody$pastel and a separator (default $). It splits the string on the separator and uses Python's random.Random(seed).choice() to pick one element. The seed input (INT, 0 to ~10 billion) drives everything: change it and you get a different pick; keep it and you get the same pick every single run.
The STRING output feeds anywhere text goes - prompt concatenation, a CLIP encoder, a LoRA name, a filename prefix. Because the input is just a delimited string, you can even chain it: one choice node for the subject, another for the style, both seeded, and the whole combination is reproducible.
The inputs that matter
input_string- your options, separated byseparator. The defaulta$b$cis a placeholder; replace it.separator- default$. Change it if your options contain$, but honestly pick a separator you never use and leave it.seed- the reproducibility dial. This is where the community's "lock the seed, change one variable, compare" discipline kicks in: fix the seed, tweak the options, and you can actually tell which change caused which output.
Two honest notes. First, it picks uniformly - every option is equally likely, so if you want weighted odds, this isn't the node. Second, unlike a manual-choice node, there's no way to force a specific pick without controlling the seed, so if you need "always the third option," the pack's String List to Combo with an index is the better tool. Random choice and indexed pick are two halves of the same job, and this pack ships both.
Where it fits
This is the node that makes "one workflow, many variations" practical. Put a few prompt variants in, wire the output into your positive prompt, and every run with a fresh seed gives you a different starting point - while every re-run with the same seed gives you the identical image, which is exactly what you want for debugging or A/B testing.
Installing it
It's part of ComfyUI-JDCN, so one install gets it. ComfyUI Manager: Install Custom Nodes → search "JDCN", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN.git
cd ComfyUI-JDCN
pip install -r requirements.txt
Only dependency is piexif; no models to download. It's a small two-person hobbyist pack (Daxton Caylor and Jerry Davos), and this is one of its more genuinely useful nodes - a seeded random picker is the kind of thing you'll actually wire into real workflows, not just toy with. Just remember the golden rule: if your output is unpredictable and you don't want it to be, check the seed.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | a$b$c | — |
| separator | STRING | $ | — |
| seed | INT | 00–9999999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |