Yieldable (Sequential) Iterator Int
A counter that remembers where it left off between runs
- INT
Most ComfyUI nodes are stateless - feed the same inputs, get the same output, every time. This one deliberately isn't. It's a counter with memory: every time the graph runs, it hands you the next integer in the sequence from start to end by step, and it remembers where it stopped the last time you queued a prompt. Queue again, get the next number. That's the whole trick, and it's a genuinely useful trick - ComfyUI has no native "for loop" primitive, so people build looping behavior out of nodes like this one plus repeated queuing, the same pattern you'll see discussed in community threads about building loops out of "easy-use" style nodes.
Practical uses: driving a sequential seed across a batch of separate queue-runs instead of a random one, walking through a list of prompts or file indices one at a time, or feeding a step counter into something like Modulo (same pack) to build cyclic behavior - style A, B, C, A, B, C - across successive runs rather than within one.
How it works
It tracks its position internally and yields the next value in range(start, end, step)-style progression on each execution, rather than recomputing from scratch. The reset input is your escape hatch: flip it and the counter goes back to start instead of continuing from wherever it was.
The inputs and outputs that matter
- start - where the sequence begins, default 0.
- end - the bound the sequence counts toward, default 10.
- step - how much it advances each time, default 1. Negative steps let you count down instead of up.
- reset - boolean, default off. Turn it on to snap the counter back to
startrather than advancing. - Output - INT, the current value in the sequence, ready to wire into a seed, an index, or a math node.
How to install it
Ships with the full LogicUtils pack - install once, every node including this one shows up. Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
then restart ComfyUI. Pure Python, no models, nothing to build.
Some context on the source: the author is aria1th, better known publicly as AngelBottomless - the trainer behind Illustrious XL, the SDXL anime finetune that displaced Pony Diffusion v6 as the open-source default. LogicUtils is a side project of his, built for his own graphs, and it's exactly as documented as the README admits: "Proper documentation is being prepared, however there are too many nodes." That's held true since the repo's last push in early 2026, when his public work moved off image generation entirely. It's still a real dependency in complex published workflows next to packs like rgthree-comfy and comfyui-kjnodes - people work out nodes like this one from the class name and the defaults, same as this article.
Common issues & troubleshooting
The counter isn't advancing between runs. Stateful nodes like this depend on ComfyUI actually re-executing them - if the rest of the graph's inputs haven't changed, ComfyUI may cache and skip re-running the node entirely on a given queue. Check that something in the chain forces re-execution, or that you're queuing fresh runs rather than relying on a cached result.
It's stuck at end and won't go further. That's expected - it's not designed to run past its bound on its own. Set reset to loop back to start, or wire reset from a Modulo/comparison node so it auto-resets once it hits the top.
Value resets when you didn't want it to. Check what's driving reset - if it's wired to something rather than a fixed widget, whatever's feeding it may be going truthy more often than you expect.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 0-9223372036854776000–9223372036854776000 | — |
| end | INT | 10-9223372036854776000–9223372036854776000 | — |
| step | INT | 1-9223372036854776000–9223372036854776000 | — |
| reset | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |