Modulo 10
The boring little wrapper that keeps your preset dial in bounds
- preset_index
- preset_label
Modulo 10 is the helper that ships with Preset Selector 10, and it's about as simple as a ComfyUI node gets: one integer in, that integer wrapped into the 0–9 range, plus a label, out. Nothing else. It doesn't touch models, text, or conditioning - it exists purely to keep a counter honest.
What it's actually for
Here's the thing you need to know up front: Preset Selector 10 already wraps its own index with preset_index % 10, so this node is never required in a wiring sense. You'd reach for it when you want the wrapped value somewhere else - shown on screen, fed to another node, or used as a clean 0–9 index that other parts of the workflow can rely on.
The README's batch pattern is the canonical use. Keep your batch image loader's image_index and a separate INT node incrementing together, both starting at 0, and run both through Modulo 10. The preset cycles 0–9 cleanly even as the raw counter keeps climbing past 10, 20, 100 - the selector never drifts out of range and you never have to manually reset anything.
The second output is the sleeper feature: preset_label gives you the string "Preset 3" for whatever the wrapped value is. Wire that into a note or a filename node and your rendered images can tell you which slot produced them, which saves a lot of "wait, which character was this?" squinting on a long batch run.
Inputs and outputs
- index - any INT from 0 to 999999, with a
control_after_generatedropdown so it can auto-increment after each run. - Outputs: preset_index (the wrapped INT, 0–9) and preset_label (STRING, the "Preset N" name).
Installing it
Same install as the rest of the pack - ComfyUI Manager, search preset_selector_custom_node, restart. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/chikiu-san/preset_selector_custom_node
Then restart ComfyUI and find it under Add Node → presets → Modulo 10. No dependencies, no model downloads.
Notes and gotchas
Because the selector wraps internally anyway, this node is mostly about legibility rather than necessity - it's the node you add when a continuously climbing counter would otherwise confuse you or downstream nodes. The one genuine trap is the same control_after_generate behavior you'll meet everywhere in ComfyUI: increment steps after the run finishes, so the value sitting in the box is the one the next run uses, not the one that just ran. That's by design, but if you've ever expected the displayed number to match the image you just made, now you know.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 00–999999 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| preset_index | INT | — |
| preset_label | STRING | — |