Flow Scheduler (Smooth Cosine)
The soft landing for flow-matching models
- model
- MODEL
- SIGMAS
Where the pack's linear sigma node is all business - even steps, no surprises - Smooth Cosine is the one you reach for when "even" isn't what you want. It generates a cosine-shaped sigma curve instead of a straight ramp: sigmas start at your denoise value, ease down slowly, accelerate through the middle, and coast into zero with no sharp corners. Same flow-matching family, gentler temperament.
The reasoning behind it is worth understanding, because it's the opposite of the SDXL advice still floating around. On flow-matching models, aggressive schedule reshaping actively hurts. The community's big Z-Image Turbo sampler sweep put it plainly: Karras and exponential are universal failures because distilled flow models want balanced sigma schedules and dislike heavy redistribution of denoising effort. Smooth Cosine goes the other way - a mathematically continuous curve with no kinks to alias into banding, more steps at the beginning and end where detail lands, fewer in the middle where denoising happens fastest.
Full disclosure: the README dresses this up with claims about how human vision reads highlights versus shadows. Treat that as vibes, not science. The practical claim - smooth, stable, works from 4 to 100 steps - is the part that holds up.
The mechanism
The node takes normalized time steps, applies (1 + cos(t·π)) / 2 to get a smooth S-curve from 1 to 0, scales everything by denoise, and appends a terminal zero so the output is steps + 1 sigmas long. The model input passes straight through untouched.
It has three inputs:
model- the flow-matching checkpoint, passed through unchangedsteps- default 8, min 4, max 100. Number of sampling stepsdenoise- 0 to 1. Denoising strength; 1.0 is full denoise
And two outputs: MODEL (wire it onward to your sampler's model input - people forget this one) and SIGMAS (wire into the sigmas input of SamplerCustomAdvanced or SamplerCustom).
How to actually use it
This is a scheduler, not a sampler - you still pick a sampler, and euler is the safe flow-matching default. The author's own recommended quality recipe is Smooth Cosine feeding into the pack's Minimal Change Flow sampler, and early community testing agrees it's a good pairing: one early tester called the pack's output "improves realism compared to euler/res_2s if you like that softer IG-type aesthetic." On Z-Image Turbo specifically: steps 8, CFG 1, and it's compatible with Klein too. For img2img work, drop denoise below 1 and that number becomes how much of the source image survives.
Install
It ships in the same pack, so the install is identical to the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-CapitanZiT-Scheduler
then restart ComfyUI. Or ComfyUI Manager → search "ComfyUI-CapitanZiT-Scheduler" → Install. No dependencies, no model files to download.
Where people get burned
- Forgetting the MODEL passthrough. If you wire only SIGMAS and leave the model dangling, you'll wonder why the sampler complains. The node hands the model through so you can splice it into a custom sampling chain.
- Treating it as a sampler. It shapes sigmas; it doesn't run the denoise loop. Pick euler (or the pack's Minimal Change Flow) yourself.
- Karras habits don't carry over. On a distilled flow model, a gentle curve like this is the sane choice, and loading it into a workflow that still runs CFG 7 or a Karras scheduler will fight itself. Keep CFG 1 on Turbo.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| steps | INT | 84–100 | Number of sampling steps |
| denoise | FLOAT | 1.000–1 | Denoising strength (1.0 = full denoise) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| SIGMAS | SIGMAS | — |