LogicUtil_Manual Choice Int
Step through integer presets run after run
- INT
Some things you only ever want set to one of a few integers: 20$24$32 for steps, 7$8$9 for CFG, 64$128$256 for a tile size. LogicUtil_Manual Choice Int turns that list into a single node where an index input decides which value comes out - the integer sibling of the pack's Manual Choice Float.
How it works
Inputs are the same shape: input_string holds your list as one line (default 1$2$3), separator splits it (default $), and index selects the element, 0-based with a default of 0. The output is an INT, cast from the chosen string. Wire index to a counter and you get a preset stepper that walks your list one value per run - ideal for batch or animation workflows where each frame or each item wants the next setting.
The code is a single choices[index] wrapped in int(), so the failure modes are the same family as its float sibling, and they're worth listing because they're the difference between "this is fine" and a dead queue:
- No bounds check on
index. Pickindex5 in a 3-item list and you get anIndexError. No wrap, no clamp, no mercy. - Everything must parse as an int. Drop a
2.5or afourinto the list andint()throws at queue time. - Whitespace matters.
"1$ 2$3"has a leading space on2andint(" 2")actually works in Python, but don't tempt fate - keep the list tight.
The genuinely nice part is how it composes. Because index is an input rather than a frozen widget, you can drive this node from anything that produces an integer - a seed-derived value, a counter, another gate. That's the whole point of the LogicUtil family, which is a port of aria1th's ComfyUI-LogicUtils riding inside the JDCN pack. Don't expect the JDCN README to help you here: it documents the file and latent batch nodes and never mentions this family.
Install
Install is the standard JDCN routine: ComfyUI Manager → "Install Custom Node" → search JDCN → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN
cd ComfyUI-JDCN && pip install -r requirements.txt
Only piexif on the requirements list, no models to fetch. And when you hit a queue error that screams IndexError, count your $ separators before you blame the node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | 1$2$3 | — |
| separator | STRING | $ | — |
| index | INT | 00–9999999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |