Nodes/RES4LYF/Sigmas Variance Floor
ComfyUI Node Runs on cloud

Sigmas Variance Floor

Clamp steps too big for variance-locked SDE

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Sigmas Variance Floor
  • sigmas
  • SIGMAS

This is a repair node for sigma schedules, aimed at one specific technique: variance-locked SDE sampling. Its job, in the author's own words, is to process a sigma schedule so that "any steps that are too large for variance-locked SDE sampling are replaced with the maximum permissible value." If you're not doing variance-locked SDE, you'll never need it. If you are, it's the thing that stops your schedule from taking a step the math can't support.

The background you need is light. RES4LYF offers SDE sampling - the mode where controlled noise is added after each step - and a "variance-locked" variant of it that keeps the noise statistics pinned. That locking imposes a ceiling on how big any single step can be; overshoot the ceiling and the sampling destabilizes. A normal scheduler doesn't know about that constraint, so it can hand you steps that are too large. Sigmas Variance Floor takes your schedule and clamps every over-large step down to what's allowed, leaving a schedule that's safe to run in that mode.

How it works

Pure schedule-in, schedule-out. It reads your SIGMAS, checks each step against the variance-lock ceiling, and rewrites any that exceed it to the maximum permissible value. You drop it between your scheduler and your sampler.

The inputs and outputs that matter

As plumbing goes it doesn't get simpler - one in, one out, no widgets to set:

  • sigmas (SIGMAS) in - the schedule to sanitize.
  • SIGMAS out - the corrected schedule, safe for variance-locked SDE.

There's nothing to tune here, which is the point: it enforces a constraint, it doesn't ask your opinion.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

then restart and hard-refresh (F5). Nothing to download.

Common issues & troubleshooting

The schedule never quite reaches sigma 0. That's expected and the node's description says so directly: because of the underlying math, steps get very small below roughly sigma 0.15–0.2, so approaching 0 is genuinely hard here. Don't fight it - a schedule that bottoms out a little above zero is normal for this mode.

I added it and my images look the same. Good - if none of your steps exceeded the ceiling, there was nothing to clamp and the schedule passes through unchanged. It only earns its keep when a step was too large; you'll notice it most when it rescues an otherwise-unstable variance-locked run.

I'm using ordinary sampling and it changed nothing useful. Right, it's specific to variance-locked SDE. On a normal ODE/SDE run it's just an extra node in the line. Only reach for it when that mode is what you're actually running.

CategoryRES4LYF/sigmas

Inputs (1)

NameTypeDefaultDescription
sigmasSIGMAS

Outputs (1)

NameTypeDescription
SIGMASSIGMAS