List Custom Int
5' and get an int list — ranges and strides in one box
- int_list
- count
ComfyUI has a weird gap: you can type a single number into a widget, but generating a list of numbers - the kind of thing you need to drive batch sampling, per-frame settings, or a sweep of test seeds - means either typing 50 widgets or bolting on a Python node. This node closes the gap with a single multiline text box and a compact syntax for numbers, ranges, and strides.
How it works
Type your numbers into the custom_text box and it parses them into an int list. The syntax does real work:
- Plain values:
1, 2, 3 - Bracket ranges with optional stride:
[5, 9]→ 5, 6, 7, 8, 9;[0, 10, 2]→ 0, 2, 4, 6, 8, 10 - Dash ranges with optional stride:
20-40:5→ 20, 25, 30, 35, 40 - Negative numbers work:
[-5, -1]→ -5, -4, -3, -2, -1
It's also forgiving in ways that matter if you're pasting from chat or notes: it normalizes full-width Chinese punctuation (,;:【】():) to ASCII equivalents, so a list copied out of a Chinese tutorial parses clean. Empty input falls back to [0] rather than erroring.
Outputs are int_list - a proper list-type output (the is_list flag, so downstream list-aware nodes see a list, not a batch) - and count, the number of items, handy for wiring into loop or chunk-size math.
Where it earns its keep
The canonical use is driving batch sizes and sweeps: feed int_list into a "for each value" pattern (via the pack's batch range nodes or a loop-capable setup) to run a sampler at 1, 2, 4, 8 frames, or to step through stride values in order. It's also the natural companion to the pack's Int Wan - 81-161:4 gives you exactly the Wan-valid frame counts, on demand. If you've ever wanted "the first 10 seeds, plus 900" in one clean input, this is how you do it without twenty disconnected widgets.
Installing it
It's part of 1hewNodes. ComfyUI Manager → search "ComfyUI 1hewNodes" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
Restart ComfyUI. No special dependencies, no model downloads.
Common issues
The parser is text-based, so keep two things straight: bracket ranges include both endpoints ([0, 4] gives five values, 0 through 4), and a bare 20-40:5 is a dash range while 20-40 with no colon is a range of every integer between 20 and 40 - that's 21 numbers, which surprises people who meant "20 and 40." If a downstream node won't accept the list, remember it's a list type; convert to a batch (the pack has list↔batch nodes) if whatever you're wiring into expects a tensor. And there's a sibling List Custom Float with the same syntax for fractional values.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| custom_text | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_list | INT | — |
| count | INT | — |