EmAySee - Random Integer from List 2
The random integer node that actually understands ranges
- random_integer
This is the grown-up version of the pack's plain random-int node, and it's the one you'll actually want. Instead of forcing you to type every candidate (1, 5, 10, 25), it accepts ranges: 1, 2, 4-6, 9, 11, 13-18 means "random from 1, 2, 4, 5, 6, 9, 11, 13, 14, 15, 16, 17, or 18." And unlike its dumber sibling, it takes a seed, so you can reproduce a run. If you need a random integer anywhere in a ComfyUI graph, this is the one to reach for.
How it works
- integer_list - comma-separated integers and/or
start-endranges. It parses the whole thing, expands ranges, and picks one withrandom.choice. - seed - sets Python's RNG before the pick. Same list + same seed = same answer.
- use_system_time (default on) - this is the fun part. When enabled, the seed is ignored and replaced with the current time in milliseconds, so every run rolls a fresh value even if the seed widget never changes. Flip it off to actually honor your seed.
Output is random_integer (INT), ready for any integer input.
The seed trap
The default of use_system_time: true will bite you the first time. You set a seed, you expect repeatability, and the node ignores you because system time is overriding it. The node's own intent is "default to a new seed on each run," which is fine for variety - but the moment you want a reproducible batch, you must uncheck that box. This is the single most confusing thing about the node, and it's buried in the optional inputs.
Where it shines
Prompt roulette, seed variety, and any workflow where you want to sample from "a spread of values" rather than a fixed set. Because ranges make the list readable, it's nicer to maintain than a wall of comma-separated numbers - 80-120 for a cfg sweep, 1-10 for LoRA index roulette. The parse also handles junk gracefully: if the format is invalid it prints an error and returns 0 instead of crashing your graph.
Installing it
Same pack as always - ComfyUI_EmAySee_CustomNodes. ComfyUI Manager → search the pack title → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
# restart ComfyUI
You'll find it under EmAySee/Utilities/List. Pure Python, no dependencies.
Bottom line
It's a small node with one real footgun (the system-time default) and one genuinely useful feature (ranges). Learn to flick that toggle off and it's the most capable random-int tool in the pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| integer_list | STRING | 1, 2, 4-6, 9, 11, 13-18 | — |
| seed | INT | 0 | — |
| use_system_timeopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| random_integer | INT | — |