๐ Range Int
Python's range(), finally, as a ComfyUI node
- values
InitialBRangeInt is the range() builtin from Python, packaged as a node. You give it a start, a stop, and a step, and it hands you back a list of integers. That sounds trivial, and it mostly is - but in a workflow language that has no native loops or lists, a range generator is genuinely load-bearing. It's the kind of node that looks pointless until the moment you need it and there's nothing else.
The three inputs (all required, all simple)
start- first value (default 0).stop- where the sequence stops, exclusive (default 10). This trips up everyone once:range(0, 10)gives you 0 through 9, not 10.step- the increment (default 1).
The output is values: the full list, e.g. start=0, stop=10, step=2 โ [0, 2, 4, 6, 8].
One quirk worth knowing before you hit it: the schema calls the output INT, but what comes out is a Python list of ints, not a single scalar. Treat it as a list/sequence output and wire it into things that consume sequences - most commonly into the InitialB For Loop machinery or a list-aware node - not into something expecting one number.
Why you'd reach for it
The honest use cases in a real workflow:
- Seeding a loop. Feed
valuesinto a For Loop Start or a per-item processing node and iterate over a sequence of seeds, strengths, or indices without hand-typing each one. - Generating a batch of parameter values. A step of 10 from 0 to 100 gives you 11 evenly spaced numbers to sweep a strength or a scale over.
- Index math for lists. Combined with the pack's Math Int, it's the raw material for any "for each item N" pattern.
The gotchas
stopis exclusive. If you want a range that includes 10, set stop to 11.- You can't count down.
stephas a minimum of 1, andrange()with a positive step over astart > stopyields nothing. Need a descending sequence? Generate ascending and flip it, or do the math with a Math Int node. - No early output. The node produces the whole list at once; it's not lazy. For a
start/stop/stepcombo that would produce tens of thousands of values, think about whether you actually want that list materialized.
Install
Pack: InitialB Util. ComfyUI Manager โ search "InitialB Util" โ Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/benjiyaya/Comfyui_InitialB_Util
cd Comfyui_InitialB_Util
pip install -r requirements.txt
Restart after. No model downloads - requirements are just torch/numpy/scipy/Pillow, all shipped with ComfyUI. (The README's clone URL is a yourusername placeholder; use the real repo above or Manager.) It sits in the InitialB/utility menu with the other data-type and math nodes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 0-99999โ99999 | โ |
| stop | INT | 10-99999โ99999 | โ |
| step | INT | 11โ99999 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| values | INT | โ |