Incrementer 🪴
A counter that steps and wraps for batch loops
- INT
- STRING
A counter. It holds a number, steps it, and wraps back to the start when it hits a ceiling. On its own that's nothing; wired into a node that takes an index, it becomes the little engine that walks a batch through a list one item at a time.
What it's actually for
Lots of nodes select something by index - pick line N of a CSV, image N of a folder, option N of a list. The question is always "who advances N?" The Incrementer is one answer. It emits a number, and each run you bump it so the downstream selector moves to the next item. When it reaches the max, it rolls over to the start instead of running off the end, so a loop keeps cycling rather than erroring out.
Think of it as the odometer for a batch: it tells the rest of the graph where you are in the sequence.
The inputs and outputs
- current_index - the number it's on right now.
- max (optional) - the ceiling it wraps at (default 10). Set this to your list length so it cycles cleanly through exactly your items.
Two outputs: INT (the number, for feeding an index input) and STRING (the same value as text, for when you want it in a filename or label).
That's genuinely all there is to the interface - which is the point. It does one small thing so you can compose it with the nodes that do the selecting.
How it fits together
Picture a CSV Reader loaded with prompts. Feed the Incrementer's INT into the reader's index, set max to the number of rows, and each run advances to the next prompt, looping back to the top after the last one. Same story with the batch image loader or any list-picker. It's the reusable "move to the next thing" primitive that the CSV, batch, and prompt-replace nodes are all built to accept.
The 🪴 in the name flags it as one of the community utility nodes ComfyUI-Addoor bundles alongside its own AD_ set.
Watch for
The wrap behavior depends on max matching your actual list length. Set max to 10 but your CSV has 25 rows and you'll only ever cycle through the first 10. Set it too high and you'll index past the end of a shorter list. Match it to the thing you're stepping through and it behaves.
Installing ComfyUI-Addoor
ComfyUI Manager: Install Custom Nodes → search "ComfyUI-Addoor" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Eagle-CN/ComfyUI-Addoor.git
cd ComfyUI-Addoor
pip install -r requirements.txt
Restart and find it under 🌻 Addoor / Utilities, ready to drive whichever selector you're looping.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| current_index | INT | 00–18446744073709550000 | — |
| maxopt | INT | 100–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |
| STRING | STRING | — |