Nodes/ComfyUI Mohseni Kit/πŸ“ˆ Mohseni Scheduler
ComfyUI Node

πŸ“ˆ Mohseni Scheduler

Aim your denoising steps where they matter

By mohsenicreativeΒ·Created 2 years agoΒ·Updated 2 months agoΒ· 2
πŸ“ˆ Mohseni Scheduler
  • model
  • SIGMAS
β—„schedulerβ–Ύβ–Ί
β—„steps20β–Ί
β—„denoise1.00β–Ί
β—„rho7.00β–Ί
β—„shift1.00β–Ί
β—„sigma_max0.00β–Ί
β—„sigma_min0.00β–Ί

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 between sigma_min and sigma_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: with denoise < 1 it computes a longer curve (steps / denoise) and trims it to the tail, so 0.45 genuinely starts you partway down the noise range. That's how the detail pass works.
  • rho - the whole point of the node. Compose 0.4–0.8, detail 7–15.
  • shift - compose 2–4 for extra high-noise density, 1.0 for 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.

Category⚑ Mohseni Kit/Sampling

Inputs (8)

NameTypeDefaultDescription
modelMODELβ€”
schedulerCOMBO1 options: karras_polynomial
stepsINT201–10000β€”
denoiseFLOAT1.000–1β€”
rhoFLOAT7.000.2–30β€”
shiftFLOAT1.000.1–10β€”
sigma_maxoptFLOAT0.000–1000β€”
sigma_minoptFLOAT0.000–1000β€”

Outputs (1)

NameTypeDescription
SIGMASSIGMASβ€”