Apply Denoise Mask Scheduler (use sigma)
Same seam-killing trick as the step version, but keyed to noise strength
- model
- MODEL
What this is, and how it's different
This is the twin of Apply Denoise Mask Scheduler (use step) - same pack, same idea, different clock. Where the step version schedules your inpainting mask by step index, this one schedules it by sigma, the actual noise level at each point in the sampling run. If you've already read the other article, skim this one; everything about why the technique exists is the same.
The problem it solves: normal ComfyUI inpainting clamps the non-mask area to the original pixels at every step, and that's precisely what leaves a visible border where the fix meets the untouched image. This node applies the mask only inside a noise window, letting the frame denoise as one image outside it - a small, deliberate loss of pixel-exactness in exchange for a seam that stops being visible. That's the whole trade, stated plainly in the pack README.
How the schedule works
Three phases, keyed to the sampler's sigma values (which descend from noisy to clean as sampling progresses):
- While sigma is above
start_sigma- the mask is skipped (set to all-ones), so the whole frame regenerates freely and global structure settles without a seam. - While sigma is between
end_sigmaandstart_sigma- the mask applies, scaled bymask_alpha. - Once sigma drops to
end_sigmaor below - skipped again, so the final fine-detail steps don't fight the boundary.
Mechanically it's the same thin layer: the node stamps a denoise_mask_function into your model's model_options and swaps in its own KSamplerX0Inpaint.__call__ so the schedule is consulted every step, restoring the original when the run ends. On a plain txt2img run with no mask, it's a no-op. The only scheduler type implemented is skip, so don't go looking for morphing or random options - the author's roadmap is "more as effective ones are identified."
The inputs that matter
Three to set:
start_sigma(default 15.0) - above this noise level, the mask is skipped.end_sigma(default 0.0) - below this, the mask is skipped again.mask_alpha(default 1.0) - mask strength while active; lower it (say 0.8) to blend a bit of the original into the fix and soften edges further.
model is your checkpoint's MODEL; scheduler_type only offers skip. The single output is a MODEL - feed it into your KSampler's model input instead of the raw checkpoint. Your mask setup (SetLatentNoiseMask or a mask loaded with your image) is untouched.
Step or sigma - which one?
The honest answer: it depends on how you think, and on whether you change step counts. Sigma is noise level, so the same start_sigma/end_sigma window means the same stage of denoising whether you're running 15 steps or 30 - that's the sigma version's real advantage. The step version gives you integer precision ("skip the first 8 steps") and is easier to reason about on a fixed-step workflow. Where the sigma version gets fiddly: you need to know your sampler's sigma range. The inputs cap at 15.0, which is tuned for SDXL-style schedules (a 20-step SDXL run starts around 14.6); a Flux or SD 3.5 run uses a different sigma scale, so the same numbers won't mean the same thing. The step version is the safer default if you're not sure.
Install and gotchas
ComfyUI Manager: search ComfyUI-denoise-mask-scheduler. Or manually:
cd custom_nodes
git clone https://github.com/MiddleKD/ComfyUI-denoise-mask-scheduler.git
Then restart ComfyUI. No requirements.txt, no model downloads - it's plain Python over torch/torchvision. The repo's example workflows reference an SDXL inpainting ControlNet and JuggernautXL, but those are optional examples. The pack is niche - a Korean dev's experimental project with essentially no community discussion - so expect it to stay as-is, and note that since it patches a core sampler class, a ComfyUI update can temporarily break it (the patch self-restores after each run, and a restart clears any stuck state).
The usual troubleshooting also applies: if you see zero effect, you're not actually feeding a mask, and with defaults (15.0 → 0.0) the window covers almost the entire run, so you're basically getting soft plain inpainting until you pull start_sigma down and end_sigma up. Tune against a fixed seed and judge the seam against the small changes the technique buys you.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| start_sigma | FLOAT | 15.000–15 | — |
| end_sigma | FLOAT | 0.000–15 | — |
| mask_alpha | FLOAT | 1.00–1 | — |
| scheduler_type | COMBO | skip | 1 options: skip |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |