Sigmas Math1
Write your own formula to generate a noise schedule
- a
- b
- c
- SIGMAS
Every other node in RES4LYF's sigma-math toolbox picks one fixed operation - a log, a hyperbolic function, a kernel smooth - and gives you a few knobs around it. Sigmas Math1 is the general-purpose escape hatch behind all of them: a text field where you type your own formula, plus three free variables and up to three optional schedule inputs to reference inside it. If you've hit the ceiling of what the pack's named nodes can do and know roughly what curve you want, this is the node built to let you just write it.
How it works
The f1 field holds your formula as a string (it defaults to "s" - almost certainly the placeholder meaning "just output the position/step variable unchanged," a sane identity default for a formula box). x, y, and z are plain float parameters your formula can reference as tunable constants. The optional a, b, and c inputs let you pull in up to three existing SIGMAS schedules and reference them inside the same formula - so you can, for example, write an expression that blends or reshapes real scheduler output rather than only generating from scratch. start, stop, and trim control the generation range and how much gets cut from the result, and rescale (with min1/max1 as the target bounds) optionally maps your formula's raw output into a specific final range.
The min1/max1 defaults are worth knowing
max1 defaults to 14.614642 and min1 defaults to 0.0291675. Those aren't arbitrary - they're recognizable as the standard EDM-style sigma bounds (sigma_max/sigma_min) that show up as defaults across ComfyUI's own sampling code, the same minimum figure Sigmas Cleanup and several other nodes in this pack use as their floor. In other words: if you turn rescale on and leave these alone, your formula's output gets mapped into the exact numeric range a typical model's own schedule occupies, which is a sensible safety net for a node that otherwise lets you generate anything.
The inputs and outputs that matter
f1(STRING, multiline, default"s") - your formula. The variable names it accepts beyonds,x,y,z,a,b,caren't documented anywhere the README or the schema spell out.x/y/z(allFLOAT, default1) - free parameters for use inside the formula.start/stop(INT, both default0) andtrim(INT, default0, always ≤ 0) - control the generation range and how much is cut from the result.rescale(defaultfalse) withmin1(0.0291675) /max1(14.614642) - optionally remap the formula's output into a target range.a/b/c(all optionalSIGMAS) - existing schedules your formula can reference.
Output is a single SIGMAS list.
Should you use this?
I checked specifically for this node in the community record and found zero mentions - not surprising, since it's the kind of tool that only pays off once you already know what curve you're trying to build, and the pack documents none of its formula syntax anywhere public. If you're comfortable reverse-engineering a mini expression language by trial and error, this is genuinely the most powerful node in the batch, strictly more general than the fixed-function transforms elsewhere in the pack. If you're not there yet, every other named node in RES4LYF's sigma toolbox is effectively a pre-written formula for exactly this node - start with those, and come back to Sigmas Math1 once you know precisely what shape you're missing.
How to install it
- ComfyUI Manager - search "RES4LYF", install, restart.
- Manual - activate your venv,
cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF,cd RES4LYF,pip install -r requirements.txt(portable builds: use the embeddedpip.exe). Restart.
Common issues & troubleshooting
No syntax reference exists. There's no README section, no source comment visible from the node schema, and no community-shared example formulas. Expect to experiment blind at first - start from the "s" default and change one small piece at a time, checking the output with a preview node after every edit.
A malformed formula likely fails loudly rather than quietly for a text-based expression node like this, which is actually the friendlier failure mode - if your workflow errors out on this node, check f1 first before assuming something else broke.
Leave rescale on with the default min1/max1 unless you deliberately want output outside a normal sigma range - those defaults line up with the real minimum and maximum sigma values most models actually use, which is the safest landing zone for a formula you're still tuning.
Mismatched lengths between a, b, c and your intended output range are undefined the same way they are for this pack's other multi-schedule math nodes - keep any schedules you feed in built from a consistent step count.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 00–10000 | — |
| stop | INT | 00–10000 | — |
| trim | INT | 0-10000–0 | — |
| x | FLOAT | 1.00-10000–10000 | — |
| y | FLOAT | 1.00-10000–10000 | — |
| z | FLOAT | 1.00-10000–10000 | — |
| f1 | STRING | s | — |
| rescale | BOOLEAN | false | — |
| max1 | FLOAT | 14.61-10000–10000 | — |
| min1 | FLOAT | 0.03-10000–10000 | — |
| aopt | SIGMAS | — | |
| bopt | SIGMAS | — | |
| copt | SIGMAS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | — |