Range Integer (Mikey)
Step through a range of whole numbers using the seed control
- INT
- STRING
The integer twin of Range Float: define a range with start, end, and step, and let the seed control pick which value in it comes out this run. Same one-line README description covers both - "generate numbers from a given range using the seed offset" - and the same trick applies: set the seed widget to increment and this becomes a free parameter sweep across queued runs.
How it works
start and end bound the range, step sets the spacing between values, and seed selects which one you get back this run. This pack uses "seed" as a general-purpose deterministic index in more than one place - it's the same design as this node's float sibling and as Load Image Based on Number, which picks a file out of a folder the same way this picks a number out of a range. Once you've spotted the pattern once in this pack, you'll see it again.
The natural use here, more than with the float version, is driving something that genuinely wants whole numbers across a sweep: batch sizes, step counts, tile counts, or an index feeding into Load Image Based on Number itself - chain this node's INT output straight into that one's seed input and you've got a controlled way to walk a folder of images in order, run after run.
The inputs and outputs that matter
startandend(INT) - the boundaries of your range.step(INT) - spacing between values.seed(INT) - which value in the range this run outputs. Fixed for a repeatable single value; increment for a sweep.INT(output) - the selected whole number, ready for anything expecting an integer input.STRING(output) - the same value as text, no separate conversion node needed if you're feeding a filename or caption.
How to install it
Bundled with the rest of Mikey Nodes. ComfyUI Manager: search "Mikey Nodes," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bash-j/mikey_nodes
then restart.
Common issues & troubleshooting
Not sweeping across runs. Same check as the float version: this node reads whatever the seed widget hands it, it doesn't sweep on its own. If successive queued runs aren't changing, the seed control is set to fixed, not increment.
Value running past end. No documented clamping or wraparound. Don't assume the node stops itself at the boundary - treat end as your intended stopping point, not an enforced ceiling, and check actual output values if you're running a long unattended batch.
Wanted decimal values. This node is integer-only - for a continuous sweep (CFG values, denoise strengths, anything with meaningful fractional steps), use Range Float instead.
Feeding this into seed on a sampler expecting genuine randomness. This node is built for deterministic, controlled sweeps - every value in the range is reachable and repeatable by design. If what you actually want is fresh random noise every run, use ComfyUI's normal randomize seed control directly on your sampler rather than routing through this node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 00–18446744073709550000 | — |
| end | INT | 00–18446744073709550000 | — |
| step | INT | 00–18446744073709550000 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |
| STRING | STRING | — |