🔶 Number Counter
A value that increments across queue runs, for animating a parameter
- restart
- repeat2step
- FLOAT
- INT
- Info
Most ComfyUI widgets give you a static number. This one gives you a number that changes on its own, one step every queue run - the building block for anything in this pack that's supposed to evolve over an animation sequence: a denoise value that ramps down over frames, a ControlNet strength that fades in, a checkpoint-switch trigger tied to frame count.
What it does
Set start, stop, and step (all FLOAT, defaults 0, 1, and 0.1) and the node walks from start toward stop by step, one increment per time it runs. mode decides what happens at the boundary: Loop wraps back to start once it passes stop, Stop_at_stop clamps and holds at stop rather than wrapping, and No_Stop keeps counting past stop rather than clamping or wrapping. Outputs are FLOAT and INT (the same value in both types, so you can wire it straight into a denoise slider or an index field without a manual conversion node) plus an Info string.
Two optional inputs tie it into the rest of the pack. restart (RESTART type) connects from the restarter node - feed it in, and bumping the restarter's Version snaps this counter back to start instead of continuing from wherever it was. repeat2step (REPEAT type) connects from either of the Load Image Batch nodes' REPEAT output - this is the one that keeps a counter in lockstep with an image batch loader that's configured to hold on the same image for several frames before advancing, so the counter's pace matches the loader's pace instead of drifting relative to it.
The "remembers where it left off between runs" behavior is the whole point, and it's worth naming plainly: this node keeps internal state across separate queue executions, which stock ComfyUI nodes normally don't do. That's exactly why the restarter node exists - without a deliberate way to reset it, a stateful counter is a counter you can never cleanly restart short of reloading the workflow.
Why you'd reach for it
Anywhere you want a value to change automatically across an animation run instead of being retyped by hand between frames - driving denoise on the img2video KSamplers, an index into an array node, a ControlNet strength schedule. If your workflow generates one static image and stops, you have no use for this; it's purely for multi-run sequences.
Installing it
Via ComfyUI Manager: search "Chaosaiart-Nodes," or "Install via Git URL" with https://github.com/chaosaiart/Chaosaiart-Nodes, then restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/chaosaiart/Chaosaiart-Nodes, restart ComfyUI. Linux needs pip install opencv-python and pip install tqdm (venv active first) for the pack to import cleanly. Windows has a bundled Install_windows script. No model downloads.
Troubleshooting
If the counter isn't advancing at all, make sure you're actually increasing the ComfyUI "Batch count" in Extra Options and letting it queue multiple runs - a single queue execution only advances the counter once, same as any run. If it never resets when you expect, check that restart is wired to the restarter's RESTART output and that you're actually bumping the restarter's Version, not just re-queueing. And if you're pairing this with a Load Image Batch node and the two seem to drift apart over a long sequence, that's the case repeat2step exists to fix - wire the batch loader's REPEAT output into it so the counter's cadence tracks the loader's dwell time on each image instead of assuming they always advance at the same rate.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 3 options: Loop, Stop_at_stop, No_Stop | |
| start | FLOAT | 0.000–100000 | — |
| stop | FLOAT | 1.000–100000 | — |
| step | FLOAT | 0.100–100000 | — |
| restartopt | RESTART | — | |
| repeat2stepopt | REPEAT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |
| INT | INT | — |
| Info | STRING | — |