๐บ List of Ints
A sequential (or shuffled) range of integers, always as a list
- ints
Batch workflows run on indexes. If you're generating a series of variations, iterating frames, or driving a loop, you almost always want a list of integers to walk through - and you want it as a proper list socket, not a comma-separated string you have to parse. Nilor List of Ints gives you that: a sequential range from min to max, with an optional shuffle, always delivered as a real INT list.
What it does
Three inputs:
min- start of the range, default 0.max- end of the range, default 9. Important: it's inclusive.min=0, max=9gives you 10 integers, not 9.shuffle- boolean, default off. When on, the range is randomized with Python'srandom.shuffle.
Output is ints, a list. The README makes the design explicit: "Output is always a list, even for single values." That matters because ComfyUI treats list sockets and scalar sockets differently, and a node that can't guarantee a list shape will produce wiring chaos. This one guarantees it, and marks the output as OUTPUT_IS_LIST so downstream list-aware nodes behave.
How it's used
The obvious pattern: a loop or per-frame driver needs one index at a time. Generate the full range here, then pull individual values with a selector - this pack's ๐บ Select Index From List is the natural partner, but any index-by-position node works. The shuffle mode is the interesting knob: with shuffle on, the same range comes back in a different order each run, which is a cheap way to randomize the order your batch is processed - handy for seed sweeps where you want to avoid "same seed, same neighbor" clustering. Note there's no seed input, so shuffled runs are not reproducible; if you need deterministic shuffle, this isn't the node.
Honest notes
Watch the inclusive max. The off-by-one here is the classic silent bug: max=9 means ten values. It matches how range-style thinking works, but it trips people who assume exclusive upper bounds.
No step/count control. You get every integer between min and max, nothing else. If you need [0, 2, 4, ...] or an arbitrary sequence, you need a different tool - the pack's ๐บ n Fractions of Int covers "split a total into N pieces" cases, but a stride isn't available in either.
Shuffle is unseeded. Fine for "mix it up," wrong for anything you'll want to reproduce later. If reproducibility matters, shuffle with a node that exposes a seed.
Install
ComfyUI Manager (search "Nilor Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/nilor-corp/nilor-nodes
cd nilor-nodes && pip install -r requirements.txt
Restart ComfyUI; it's under Nilor Nodes ๐บ โ Generators. No dependencies.
Bottom line
The right tool for "I need a list of consecutive integers, as a list." Inclusive max is the one thing to remember, and the unseeded shuffle is the one limitation to respect. It's boring, predictable, and does exactly what the label promises - which in ComfyUI is more than half the battle.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| min | INT | 0 | โ |
| max | INT | 9 | โ |
| shuffle | BOOLEAN | false | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ints | INT | โ |