π’ CR Increment Integer
A Whole-Number Staircase for Your Animation
- INT
- show_help
CR Increment Integer is the whole-number counterpart to CR Increment Float: instead of smoothly interpolating like CR Gradient Integer does, it holds a value steady for a stretch of frames, then jumps it up by a fixed integer step, then holds again - a staircase, not a ramp.
How it works. start_value is where the count begins, step is how much it jumps by, and start_frame / frame_duration define how many frames each stair lasts before the next jump. Feed it current_frame from your animation loop, and it works out how many jumps should have happened by that frame and returns the resulting integer. A step of 1 with frame_duration of 16 means the value goes up by exactly 1 every 16 frames - held flat in between, not drifting continuously.
When you want steps instead of a smooth ramp. Anything that needs to change in visible, discrete jumps rather than an imperceptible crawl: a batch index that should genuinely be a new whole number for each stage of an animation, a seed offset that steps by a fixed amount every so many frames instead of every frame, a step count for the sampler that should only ever be a clean integer. If you want the continuous version of the same idea instead, CR Gradient Integer is the one to use - it interpolates smoothly between a start and end value rather than jumping in fixed steps.
One technical note. Like its float sibling, this node is flagged as an "output node" in ComfyUI's graph model, meaning it executes on every queued run regardless of whether anything is wired downstream from it - CR Gradient Integer doesn't carry that same flag. Worth knowing if you're used to ComfyUI skipping unconnected nodes.
Inputs and output that matter. start_value and step (the base value and the jump size, both integers), start_frame / frame_duration (the timing of each step), current_frame (where you currently are). Output is a single INT plus show_help.
Install. ComfyUI Manager: search "Comfyroll Studio", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. No models needed - pure math.
Troubleshooting. The value that never changes is almost always a current_frame that isn't actually wired to a live counter - check that first before assuming the node's math is wrong. And the pack-wide caveat applies as always: Comfyroll's entire node roster registers from one shared file, and a documented failure mode on r/comfyui (Failed to load Graphics nodes / Failed to load Utility nodes from a broken import) takes down every Comfyroll node at once, this one included. If nodes are missing after install, redo it with a clean git clone before troubleshooting anything else.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| start_value | INT | 10β9999 | β |
| step | INT | 1-9999β9999 | β |
| start_frame | INT | 00β9999 | β |
| frame_duration | INT | 10β9999 | β |
| current_frame | INT | 00β9999 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | β |
| show_help | STRING | β |