SawtoothWave π π π
A ramp that resets β build a scanning or sweeping motion in one node
- FLOAT
- INT
SawtoothWave is the wave that doesn't come back down - it climbs, then instantly jumps back to the start and climbs again. Imagine a value creeping upward over a set number of frames, then snapping to zero for a single frame before resuming. That's a sawtooth, and it's exactly what you want for scanning lines, progress-style sweeps, or any effect that should build up and then reset like a counter hitting its limit.
It's also the odd one out in the wave family in a good way: its inputs are phase, step_increment, x_translation, start_value, and current_frame - no amplitude, no y_translation. The formula makes the difference obvious:
value = start_value + step_increment Γ (current_frame % phase) β x_translation
Every phase frames, current_frame % phase wraps back to zero, so the value resets to start_value β x_translation and starts climbing again. step_increment is how much it rises per frame - crank it and the ramp gets steeper; phase sets how long each ramp runs before the snap. x_translation nudges the whole thing down. Output is FLOAT with an INT twin.
When you'd reach for it
The reset is the whole point. Use it for a sweep that repeatedly builds and vanishes - a radar-style ping, a bar that fills and empties, a scanline traveling down a frame, a light that grows then restarts. It's also quietly useful as a frame counter: because it's built on current_frame % phase, it gives you a number that increments within a fixed window, which is a neat way to drive a looping animation without writing a schedule.
Install and gotchas
It's in the FizzNodes pack, so: ComfyUI Manager β search FizzNodes β install β restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes
cd ComfyUI_FizzNodes && pip install -r requirements.txt
Only numpy, pandas, numexpr - no models. Under FizzNodes π
π
π
β WaveNodes.
The one surprise is the one-frame discontinuity: the value hits its peak and drops to the floor in a single frame, so if your output parameter has a visible jump there, that's the sawtooth working as intended - switch to TriangleWave if you wanted the climb to go back down smoothly. And same as its siblings, it needs current_frame to advance; in a single still render it outputs one constant number and looks inert.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| phase | FLOAT | 10β9999 | β |
| step_increment | FLOAT | 0.50β9999 | β |
| x_translation | FLOAT | 00β9999 | β |
| start_value | FLOAT | 0.500β9999 | β |
| current_frame | INT | 10β9999 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | β |
| INT | INT | β |