Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Random Integer From Toggles (Premade Labels)
ComfyUI Node

EmAySee Random Integer From Toggles (Premade Labels)

Pick from only the options you switched on

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Random Integer From Toggles (Premade Labels)
  • option_1
  • RANDOM_TOGGLE_INTEGER
node_descriptionSelect options below to choose from randomly.
option_2false
option_3false
option_4false
option_5false
option_6false
option_7false
option_8false
option_9false
option_10false
option_11false
option_12false
option_13false
option_14false
option_15false
option_16false
option_17false
option_18false
option_19false
option_20false

Twenty checkboxes, one output, and a coin flip over whatever you bothered to tick. This node is a "curated random": instead of feeding it a list of integers, you flip on exactly the options you want in the pool, and it returns the index of whichever one wins. It's a nicer UX for the "variety run" problem than typing a comma-separated string, because the options you don't want are just left off instead of typed wrong.

How it works

You get option_1 through option_20, each a boolean toggle (option_1 is the special TOGGLE type; the rest are plain booleans - functionally the same checkbox). There's also a node_description field, which is just a label with a default of "Select options below to choose from randomly." It doesn't do anything except sit there as a note.

When the node runs, it collects the numbers of every checked option and picks one at random. So ticking options 3, 7, and 12 gives you a fair 1-in-3 shot at returning 3, 7, or 12. Output is RANDOM_TOGGLE_INTEGER (INT), which wires into any integer input - seed, aspect-ratio index, prompt-switch, whatever.

The honest caveat

"Premade labels" is aspirational. The source ships labels like "Option 1: Label for Option 1" - there are no actual premade labels in the code. So the name promises organized presets and delivers 20 anonymous toggles. For most uses that's fine; you mentally map option 4 to "the anime checkpoint" and move on. But if you expected named categories, set expectations accordingly.

The 0 trap

If nothing is checked, the node returns 0. No error, no warning beyond a console print. In a workflow where 0 is a valid seed or index, that's a silent no-op that can look like a bug. And because there's no seed input, there's no reproducibility - every run is a fresh roll. Use it for true variety, not for reproducible batches.

Installing it

Part of the ComfyUI_EmAySee_CustomNodes pack. ComfyUI Manager → search ComfyUI_EmAySee_CustomNodes → Install, or:

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

Find it under EmAySee_Utils. No dependencies, no model files.

When to reach for it

If your "random from list" list keeps changing as you audition styles, toggles beat strings - you uncheck what's out and rerun. Just remember you're curating a roulette wheel, not building a reproducible experiment.

CategoryEmAySee_Utils

Inputs (21)

NameTypeDefaultDescription
node_descriptionSTRINGSelect options below to choose from randomly.
option_1TOGGLEfalse
option_2BOOLEANfalse
option_3BOOLEANfalse
option_4BOOLEANfalse
option_5BOOLEANfalse
option_6BOOLEANfalse
option_7BOOLEANfalse
option_8BOOLEANfalse
option_9BOOLEANfalse
option_10BOOLEANfalse
option_11BOOLEANfalse
option_12BOOLEANfalse
option_13BOOLEANfalse
option_14BOOLEANfalse
option_15BOOLEANfalse
option_16BOOLEANfalse
option_17BOOLEANfalse
option_18BOOLEANfalse
option_19BOOLEANfalse
option_20BOOLEANfalse

Outputs (1)

NameTypeDescription
RANDOM_TOGGLE_INTEGERINT