CosineScheduler
A smooth sigma curve, with a period knob nobody explains
- SIGMAS
CosineScheduler generates a sigma schedule shaped by a cosine curve - a smooth, S-less glide from sigma_max down to sigma_min rather than the equal-chunk linear falloff you get from the stock "simple" scheduler. In the wider ComfyUI ecosystem, "cosine" usually shows up as the cosine timestep schedule used by training and some distilled models, so you may have heard the word and assumed this is that. It isn't quite - this is a curve generator with a period parameter that changes what the cosine does, and the period knob is the whole personality of the node.
How it works
The schedule is computed as a cosine of your step position, stretched and shifted so it always starts at sigma_max and ends at sigma_min. The period input is what you actually tune. It scales the angle the cosine sweeps through: at the default period of 0.5 the curve makes a single smooth descent across your steps. Crank period up and the cosine sweeps through more of its cycle - you get a wavier, more undulating schedule where noise removal speeds up and slows down multiple times across the run. Drop it toward 0 and the curve flattens into something closer to a linear ramp.
So: period = "how many waves of the cosine does my schedule traverse." It's a shape control, not a math detail. If a plain linear or Karras schedule feels boring, this is the cheap way to get a curve with character.
The inputs and output
steps(20) - how many sigma values to generate.sigma_max(1.0) /sigma_min(0.0) - the endpoints. Note the default range is 0–1.period(0.5) - the wave count. Start here; everything else is bookkeeping.- Output:
SIGMAS- feed it to a KSampler's scheduler slot, a guider's CFG curve, or another sigma node.
Because the defaults live in the 0–1 range, this node is really two nodes depending on where its output goes: straight into a guider as a CFG curve (shape only - perfect), or into an actual sampler schedule after you rescale it with ScaleToRange (shape + range).
Install
Part of ComfyUI-ScheduledGuider-Ext. ComfyUI Manager - search ComfyUI-ScheduledGuider-Ext - or:
cd ComfyUI/custom_nodes
git clone https://github.com/mfg637/ComfyUI-ScheduledGuider-Ext
Restart ComfyUI. No model downloads, no extra Python dependencies.
Common issues
The one thing that bites people is forgetting the range. A 0-to-1 sigma schedule fed straight into a KSampler on a standard SD 1.5 model is going to denoise almost nothing - your model's real sigma_max is closer to 14.79. If your CosineScheduler output produces images that barely change from the noise, you forgot the ScaleToRange step. If it's feeding a guider instead, you're fine as-is and the range genuinely doesn't matter - only the shape does.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| steps | INT | 201–10000 | — |
| sigma_max | FLOAT | 1.000–5000 | — |
| sigma_min | FLOAT | 0.000–5000 | — |
| period | FLOAT | 0.500–5000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | — |