π Mohseni Scheduler
Aim your denoising steps where they matter
- model
- SIGMAS
Most people pick a scheduler from the dropdown and never think about it again. MohseniScheduler is for when you want to think about it - it hands you a Karras-style sigma curve and gives you two knobs, rho and shift, that decide where in the noise range your steps actually land. That's a real tool, not a gimmick: composition and color form at high noise, fine detail forms at low noise, and a schedule that spends its steps in the wrong band just wastes them.
It's built around two-stage sampling - a composition/color pass at full denoise, then a detail pass on top of that latent. It ships in the small ComfyUI Mohseni Kit pack, and it's honest to say this isn't a community staple yet; it's a niche scheduler from an individual author, and the niche it fills is real.
How it works
The node implements the classic Karras polynomial spacing - the same sigma_min^(1/rho) / sigma_max^(1/rho) interpolation that ComfyUI's stock karras schedule uses - but with rho exposed as a live input instead of hardcoded to 7. Read the output like this:
rho < 1- steps held up in the high-noise band. That's a composition bias.rho = 1- plain linear spacing betweensigma_minandsigma_max.rho > 1- steps packed into the low-noise band. That's a detail bias.
shift is a second remap on top of rho (a (shift*s) / (1 + (shift-1)*s) curve, for the curious) that pulls even more density toward the high end; 1.0 means off. The README calls it "resolution-aware," but in the shipped code it's purely a curve remap - no resolution input involved.
The inputs that matter
You get model (used to read the model's own sigma_min/sigma_max), steps, denoise, rho, shift, and optional sigma_max/sigma_min where 0 means "auto from model." The ones a beginner actually sets:
steps- per-stage step count, 15β30 is the sensible band.denoise- the mechanism here is nice: withdenoise < 1it computes a longer curve (steps / denoise) and trims it to the tail, so0.45genuinely starts you partway down the noise range. That's how the detail pass works.rho- the whole point of the node. Compose0.4β0.8, detail7β15.shift- compose2β4for extra high-noise density,1.0for detail.
Output is a single SIGMAS. Wire it to SamplerCustom or SamplerCustomAdvanced (add a KSamplerSelect for the sampler) - not the plain KSampler, which takes its schedule from a dropdown and won't accept this.
Where it fits
This is a schedule-reshaping tool, and schedule reshaping is a DDPM-style model move. On SD 1.5, SDXL, and their finetunes (Illustrious, NoobAI, Pony) a reshaped curve is a genuine correction. On flow-matching models like Flux, aggressive curves mostly distort a near-straight trajectory - the KB's sampler essay is blunt that Karras-style redistribution is where those models break. So: reach for this on SDXL-family checkpoints, not Flux.
A recipe that works: pass 1 on an empty latent, denoise 1.0, rho 0.6, shift 3.0; feed that latent into pass 2 at denoise 0.45, rho 10, shift 1.0, then VAE Decode. Want a detail pass without splitting? denoise 1.0 with sigma_max β 2.5 keeps the whole schedule in the low-noise band.
The pack also patches two fixed presets into the stock KSampler dropdown - mohseni_compose (rho 0.5, shift 3) and mohseni_detail (rho 7). They're convenience only, no live controls, and they're skipped cleanly on incompatible builds.
Install
Grab the whole pack once and both its nodes come along:
cd ComfyUI/custom_nodes
git clone https://github.com/mohseni-mr/ComfyUI-Mohseni-Kit
...or search ComfyUI Mohseni Kit in ComfyUI Manager, then restart. No model files to download. The pack pulls in PyQt6 and ftfy; the scheduler itself only touches torch - PyQt6 is there for the kit's FloatPreview window, so it's a chunky install for a tiny node. (Note the README also lists psutil - it isn't in requirements.txt, so if the pack errors at load in a bare env, pip install psutil fixes it.)
Troubleshooting, short version: SIGMAS won't plug into a stock KSampler - that's by design, use SamplerCustom. And remember the sampler still matters: this node decides how much noise each step removes, not the algorithm that removes it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| scheduler | COMBO | 1 options: karras_polynomial | |
| steps | INT | 201β10000 | β |
| denoise | FLOAT | 1.000β1 | β |
| rho | FLOAT | 7.000.2β30 | β |
| shift | FLOAT | 1.000.1β10 | β |
| sigma_maxopt | FLOAT | 0.000β1000 | β |
| sigma_minopt | FLOAT | 0.000β1000 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | β |