ClownOptions SDE Mask
Add SDE noise to only part of the image
- mask
- options
- options
SDE sampling in RES4LYF re-injects a bit of noise after every step - that's the eta knob, and it's a big part of how the pack gets its detail. But normally that noise hits the whole frame evenly. This node makes it spatial: paint a mask, and you decide how much SDE noise lands inside the mask versus outside it.
Why you'd want that: SDE noise adds texture and variation, which is great on a face or fabric and distracting on a flat sky or a background you want to stay calm. With a mask you can crank noise where you want richness and keep it near zero everywhere else - a kind of localized detail control that stacks on top of your normal sampling.
How it works
You feed it a MASK and two bounds. Where the mask is white, the SDE noise amount scales toward the max value; where it's black, it scales toward min. In between, it blends. So a soft-edged mask gives you a smooth falloff from noisy to clean across the image, not a hard seam. The result is packaged as an OPTIONS object the sampler reads while it adds its per-step noise.
Note this modulates SDE noise specifically - you need to actually be SDE sampling (eta above 0 on the sampler) for it to have anything to act on.
The inputs that matter
mask(MASK, optional) - the region map. White = themaxend, black = theminend. This is the whole point of the node; without a mask there's nothing to modulate.max(default1) - the noise scale in the white areas. Leave near 1 for full noise there.min(default0) - the noise scale in the black areas. 0 means "no SDE noise here," which is the usual intent - keep the background quiet.invert_mask(defaultfalse) - flip which side is which, so you don't have to redraw a mask to swap max/min regions.
Chain in with the optional options input; the output is options (OPTIONS) heading to the sampler.
Installing RES4LYF
ComfyUI Manager: search RES4LYF, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
pip install -r RES4LYF/requirements.txt
Portable users use the embedded pip (python_embedded/Scripts/pip.exe). Restart, hard-refresh with F5. No models to fetch.
Common issues
No difference at all. Two usual causes: your sampler's eta is 0 (no SDE noise exists to mask), or max and min are the same value (uniform, so the mask does nothing). Set eta above 0 and give max/min a real spread.
The masked edge looks harsh. Use a soft/feathered mask. Hard-edged masks produce a visible noise boundary; a gradient mask blends the transition.
Mask is backwards. If the region you wanted noisy came out clean, flip invert_mask rather than repainting.
It's ignored downstream. As with every ClownOptions node, this only bites once the options output reaches a RES4LYF sampler's options input, directly or via a chain.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| max | FLOAT | 1.00-100–100 | Clamp the max value for the mask. |
| min | FLOAT | 0.00-100–100 | Clamp the min value for the mask. |
| invert_mask | BOOLEAN | false | — |
| maskopt | MASK | — | |
| optionsopt | OPTIONS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | OPTIONS | — |