🔢 AGSoft Loop Integer
An integer range that doesn't quietly drop the end value
- INT
The simplest member of the AGSoft loop family, and the one everything else builds on. AGSoft Loop Integer generates an integer sequence from a start to an end with a step, and hands it back as a list for your loop nodes to chew through. The feature in the name: the end value is included. start=0, end=3 gives you [0, 1, 2, 3], not [0, 1, 2].
That inclusive end is not a triviality. Python's own range() stops one short, and a disturbing number of ComfyUI list generators inherited that behavior. When you're looping seeds or step counts, the difference between "my loop covers 0 through 10" and "my loop covers 0 through 9, then silently ends" is the difference between a correct sweep and a workflow that misses the value you most wanted to test.
How it works
start_at_step- the first number (default 0). Negative values work, so[5, 4, 3, ...]descending is just start > end.end_at_step- the last number, and per the docs it IS included.start=5, end=5yields[5]- a single value, no crash.jump- the step (1–1000, must be ≥1).jump=2from 0 to 6 gives[0, 2, 4, 6]. Step 0 raises a clear error rather than hanging.
Output: a single INT list. The node also implements IS_CHANGED keyed on the three inputs, so it only re-runs when your range actually changes - a small efficiency win in a graph that executes a lot.
Installation
From comfyui-AGSoft:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
# restart ComfyUI
Or ComfyUI Manager → search "comfyui-AGSoft". No models, no extra deps.
Where it fits
Any loop that iterates integers: seed walks, step schedules, batch indices. Pair it with the pack's AGSoft Loop Fix Integer when you want to hand-type specific values instead of generating a range, or with AGSoft Loop Float when your sweep needs fractional steps. The one honest caveat: if your loop framework has its own inclusive range generator, this adds nothing. If it doesn't, you'll find out the hard way why "inclusive end" is the feature that matters.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| start_at_step | INT | 0-10000–10000 | Starting number of the sequence. Example: start=0, end=3 → [0, 1, 2, 3] Начальное число последовательности. Пример: start=0, end=3 → [0, 1, 2, 3] |
| end_at_step | INT | 10-10000–10000 | Ending number — this value IS included. Example: start=5, end=5 → [5] Конечное число — оно ВКЛЮЧАЕТСЯ. Пример: start=5, end=5 → [5] |
| jump | INT | 11–1000 | Step size between numbers. Must be ≥1. Example: jump=2 → [0, 2, 4, 6] Шаг между числами. Должен быть ≥1. Пример: jump=2 → [0, 2, 4, 6] |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |