Counter Float
Counter Float (CounterFloat) — ComfyUI-LogicUtils
- FLOAT
Counter Float is the one node in this pack with a memory. Most nodes are pure functions: same inputs, same output, every time. This one keeps state between runs, incrementing its value each time you queue. That's unusual for ComfyUI and it's the whole reason to use it, because it lets a workflow count across executions.
The use cases are all loop-shaped. Stepping through a batch one run at a time. Driving a frame index for something animation-like. Bumping a seed or an index each generation so successive runs walk through a sequence instead of repeating. Anywhere you want "a number that goes up a bit every time I hit run," this is it. It turns the queue button into an iterator, which is a genuinely different way to work than the usual one-shot graph.
Counter Float ships in ComfyUI-LogicUtils, the utility pack from aria1th, the handle behind AngelBottomless who trained Illustrious XL. It's a personal toolkit with sparse docs, and a stateful node like this is exactly the kind of clever, slightly surprising thing you find in a researcher's private collection.
Inputs and outputs
One required input and two optional ones. start (FLOAT) is the value it begins from. step (optional FLOAT, default 1) is how much it adds each run, and yes, a negative step counts down. reset (optional BOOLEAN, default false) sends the counter back to the start when set true. The single output is a FLOAT, the current count. It's an output node, so it runs on queue.
The mental model: on each execution it takes the running value, adds step, and hands you the result, unless reset is true, in which case it goes back to start.
Installing it
- ComfyUI Manager: Custom Nodes Manager, search "ComfyUI-LogicUtils," install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, then restart.
No models, no serious dependencies. The pack's optional auto-installer is off unless you set COMFYUI_LOGICUTILS_AUTO_INSTALL=1 (force off with COMFYUI_LOGICUTILS_SKIP_INSTALL=1), and a counter needs none of it.
The stateful gotchas
Because it remembers, this node behaves differently from everything around it, and that's where the confusion comes from. If the count is "stuck" or starting from a weird number, it's because the state carried over from earlier runs. Flip reset to true, queue once to zero it back to start, then set reset false again to resume counting. Restarting ComfyUI also clears the state.
The other thing worth knowing is that a stateful, always-changing node defeats caching for anything downstream of it: since its value moves every run, the nodes it feeds have to recompute every run too. That's fine and expected for a counter, but it means you shouldn't be surprised when a graph with a Counter in it never gets to skip work. If you need the output as a whole number for an integer field, run it through Round on the way out.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| start | FLOAT | 0-9223372036854776000–9223372036854776000 | — |
| resetopt | BOOLEAN | false | — |
| stepopt | FLOAT | 1-9223372036854776000–9223372036854776000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |