Nodes/RES4LYF/Sigmas LambertW
ComfyUI Node Runs on cloud

Sigmas LambertW

Reshape a schedule with the inverse of x times e^x

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Sigmas LambertW
  • sigmas
  • SIGMAS
branchprincipal
scale1.00
normalize_outputtrue
max_iterations20

The Lambert W function is one of those special functions that mostly shows up when you're solving an equation with a variable stuck both inside and outside an exponential - it's defined as the inverse of f(x) = x·eˣ, and unlike most of the functions elsewhere in this pack, it doesn't have a closed-form solution, which is why this node exposes a max_iterations setting: under the hood it's being computed numerically, step by step, until it converges. Sigmas LambertW applies this function to reshape a noise schedule.

Two branches, because the function isn't single-valued

Over part of its domain, x·eˣ = y has two different solutions for a given y, which is why Lambert W comes in branches - conventionally called W₀ (the "principal" branch) and W₋₁ (the "secondary" branch here). They diverge from each other outside a narrow shared region, so switching branch on this node can produce a meaningfully different reshaped curve, not just a small variation.

The inputs and outputs that matter

  • sigmas (SIGMAS, required) - the schedule to reshape.
  • branch (enum: principal, secondary; default principal) - which solution branch of the function to use.
  • scale (default 1, range 0.01–10) - scales input values before the function is applied, controlling where on the curve your schedule's values land.
  • normalize_output (default true) - rescale the result back into a usable sigma range.
  • max_iterations (default 20, range 5–100) - caps the numerical solver used to compute the function. Higher values mean more precision at the cost of more compute; the default is a reasonable middle ground for a function that typically converges fast.

Output is a single SIGMAS list.

Should you use this?

I'll be upfront: this is one of RES4LYF's deep special-function nodes, and I found no README coverage or community discussion of anyone using it to reshape a real schedule. Unlike Sigmas Hyperbolic's tanh, which has an obvious kinship to schedule shapes people already trust (S-curves, saturating compression), Lambert W doesn't have an intuitive "this is what it does to a noise curve" story - it's genuinely raw mathematical material, here because RES4LYF's whole premise is giving you building blocks rather than a curated shortlist. If you're comfortable exploring blind with a preview node in hand, it's here for you. If you want a schedule shape with actual track record, this isn't it.

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 embedded pip.exe). Restart.

Common issues & troubleshooting

Lambert W has a limited real-valued domain, particularly on the secondary branch - feed it values outside where a real solution exists and expect NaNs rather than a graceful fallback. If switching to secondary breaks your output, that's very likely why; try principal or adjust scale to bring your values into range first.

Very low max_iterations can leave the numerical solver under-converged, producing an inaccurate result rather than an error - you won't necessarily get a crash, just a subtly wrong curve. If your output looks off in a way you can't explain, try raising max_iterations before assuming the problem is elsewhere.

Always check the result with a preview before a real render. As with the rest of this pack's exotic sigma-math corner, there's no guarantee the output trends smoothly toward zero the way a sampler expects - run it through Sigmas Abs and Sigmas Cleanup first.

CategoryRES4LYF/sigmas

Inputs (5)

NameTypeDefaultDescription
sigmasSIGMAS
branchCOMBOprincipal2 options: principal, secondary
scaleFLOAT1.000.01–10
normalize_outputBOOLEANtrue
max_iterationsINT205–100

Outputs (1)

NameTypeDescription
SIGMASSIGMAS