Linear Scheduler
The linear scheduler ComfyUI forgot to ship (and how to wire it)
- SIGMAS
ComfyUI's stock scheduler list is a weird thing. You get normal, karras, exponential, sgm_uniform, simple, ddim_uniform, beta, linear_quadratic, kl_optimal - and no plain linear. The BasicScheduler node pulls its dropdown straight from that list, so the custom sampling graph specifically has no "remove the same amount of noise every step" option. That gap is exactly what this node exists to fill. It's a 10-line utility, and it knows it.
What it actually does
LinearScheduler takes steps, sigma_max, and sigma_min, and hands you a SIGMAS tensor of steps + 1 evenly-spaced values running in a straight line from sigma_max down to sigma_min. Under the hood it's a single call: torch.linspace(sigma_max, sigma_min, steps + 1). That's the entire node.
The +1 isn't a quirk - it's the k-diffusion convention. Samplers loop len(sigmas) - 1 times, so you feed steps + 1 values to get steps actual denoising steps, with the first (largest) sigma being the noise level you start from. Any scheduler node does this; this one just does it with a ruler.
What a linear schedule buys you: equal absolute noise removal per step. Contrast that with Karras, which concentrates denoising effort in the middle steps - a correction on curved DDPM trajectories, and a distortion on straight ones. If you're running distilled flow-matching models (Flux, Z-Image, anything rectified-flow) at few steps, "boring straight line in sigma space" is genuinely the right move, not a compromise. The community lands on this constantly - "just set shift 1 on simple" is the known workaround people use to fake one, and several Z-Image scheduler packs ship a linear 1→0 schedule as their headline feature. This node is that same trick, as a drop-in node instead of a workaround.
The inputs that matter
Three inputs, all required:
- steps - how many denoising steps (default 20).
- sigma_max - where the schedule starts (default 1.0).
- sigma_min - where it ends (default 0.0).
Here's the trap, and it's the one thing that will actually bite you. The defaults are 1→0, which is right for flow-matching models where sigma lives in roughly [1, 0]. For SD 1.5 and SDXL, sigma lives in roughly [14.6, 0.03] - the exact defaults ComfyUI's own KarrasScheduler ships with. Run this node on SDXL with stock settings and you'll be denoising from noise level 1 instead of 14.6, which is barely any denoising at all: a soft, muddy, half-cooked image. Set sigma_max to your model's max noise and sigma_min near zero and you're fine.
Where the output goes
The single output is SIGMAS, which wires into the sigmas input of SamplerCustom or SamplerCustomAdvanced - not into a plain KSampler. You'll also need a sampler node feeding the same custom sampler (KSamplerSelect or SamplerSelect, if you want to pick one manually). It's the same plumbing as KarrasScheduler or ExponentialScheduler; swap this node in where one of those would go.
Installing it
ComfyUI Manager is the easy route - search linear_scheduler and install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/baslack/linear_scheduler
Then restart ComfyUI. That's the whole install: no model files, no extra dependencies (it only uses torch, which ComfyUI already ships), no Python version gotchas. License is GPL-3.0.
Honest verdict
It's brand-new, with zero community footprint - which is fine for a utility this small, and worth knowing so you don't expect ongoing maintenance. You could paste the get_sigmas body into your own custom node in five minutes if you wanted, and unlike BasicScheduler it doesn't clamp to your model's sigma range, so garbage in, garbage out. But if you're building a SamplerCustom chain and want the most conservative schedule there is, this is the one that's otherwise missing.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| steps | INT | 201–10000 | — |
| sigma_max | FLOAT | 1.000–5000 | — |
| sigma_min | FLOAT | 0.000–5000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | — |