Nodes/RES4LYF/Sigmas SquareRoot
ComfyUI Node Runs on cloud

Sigmas SquareRoot

Compress a schedule's high end with a square root

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

A square root is a concave curve - it squashes big numbers down proportionally more than it squashes small ones. Apply that to a sigma schedule and the effect is uneven: the large values early in the schedule (high noise) get pulled down a lot, while the small values near the end (low noise) barely move. The net result is a schedule where the early, high-noise steps sit relatively closer to the rest of the curve than they did before - a gentler-feeling ramp down from the top, without touching the tail.

It's a one-parameter tool, which makes it easy to reach for when you want to soften a schedule's aggressive opening without hand-tuning a whole new curve.

The inputs and outputs that matter

sigmas is the schedule to transform - every value gets replaced with its square root. handle_negative (off by default) exists because a square root of a negative number isn't a real number; if there's any chance your schedule has dipped below zero - say, after passing through Sigmas Math3 or another node upstream that can produce negative values - turn this on so the node has a defined way to deal with it instead of producing NaNs. On a normal, never-negative schedule, leave it off. The output is a single SIGMAS.

Where this differs from something like Sigmas Percentile is that it's not aiming at a target range at all - you don't tell it where you want the schedule to end up, you just apply the operation and see where the values land. That makes it a blunter, faster tool to reach for when you want "gentler at the top" as a quick experiment, and a worse tool when you need precise control over the resulting range - chain a rescale node after it if the output needs to land somewhere specific.

Installing it

ComfyUI Manager: search RES4LYF, install, restart. Or manually:

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

Use the embedded pip.exe on portable ComfyUI installs. Restart and hard-refresh the tab after.

Where people get tripped up

If your output has NaNs in it, that's almost certainly a negative value hitting the square root without handle_negative switched on - flip it on before debugging anything else. Beyond that, remember this squashes magnitude, not shape: it won't rescue a schedule whose relative pacing is wrong, only soften how extreme its highest values look relative to the rest. If the schedule still feels off after applying it, the problem is probably upstream, not something SquareRoot alone will fix.

CategoryRES4LYF/sigmas

Inputs (2)

NameTypeDefaultDescription
sigmasSIGMAS
handle_negativeBOOLEANfalse

Outputs (1)

NameTypeDescription
SIGMASSIGMAS