Nodes/RES4LYF/Sigmas Lerp
ComfyUI Node Runs on cloud

Sigmas Lerp

Blend two noise schedules by a proportion

By ClownsharkBatwing·Created 2 years ago·Updated 17 days ago· 1,222
Sigmas Lerp
  • sigmas_a
  • sigmas_b
  • SIGMAS
t0.50
ensure_lengthtrue

Linear interpolation - lerp - is one of the most reused pieces of math in computer graphics, and Sigmas Lerp is the straightforward version of it applied to sigma schedules: give it two schedules and a blend factor t, and it hands back a new schedule that's t of the way from the first to the second.

How it's different from Sigmas2 Add

The pack already has Sigmas2 Add and Sigmas2 Mult for elementwise combining two schedules, but those are unweighted - they just add or multiply straight through. Sigmas Lerp is proportional: at t = 0 you get exactly sigmas_a back, at t = 1 you get exactly sigmas_b, and anywhere in between is a weighted blend. That makes it the better tool when you want to dial in how much of a second schedule to mix into a base one, rather than just combining them outright.

How it works

For every position, the output is sigmas_a + t * (sigmas_b - sigmas_a) - the standard lerp formula, applied elementwise. ensure_length handles the case where the two input schedules aren't the same length, presumably by padding or trimming one to match the other rather than failing outright.

The inputs and outputs that matter

  • sigmas_a (SIGMAS, required) and sigmas_b (SIGMAS, required) - the two schedules to blend.
  • t (default 0.5, range 0–1) - the blend factor. 0 is all sigmas_a, 1 is all sigmas_b, 0.5 is an even mix.
  • ensure_length (default true) - reconciles mismatched schedule lengths instead of leaving the blend undefined.

Output is a single SIGMAS list.

When to actually reach for this

Anytime you want to mix two schedule shapes rather than fully committing to one - say, blending a standard beta57 curve with a custom hand-built one to soften how aggressive the custom shape is, or A/B-testing a range of intermediate schedules by sweeping t across a batch. It's a much more predictable way to combine two schedules than most of this pack's other two-input math nodes (Sigmas2 Add, Sigmas DotProduct, Sigmas CrossProduct), because the output at the extremes is exactly one of your two inputs - no guessing what the combined shape will look like.

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

Leave ensure_length on unless both schedules already share a step count. With it off and mismatched lengths, the blend is undefined territory that nothing documents - safest to just build sigmas_a and sigmas_b from schedulers with the same step count in the first place.

A blend of two valid, monotonic schedules is usually still reasonably well-behaved - this is one of the calmer nodes in the pack in that respect, since lerp doesn't introduce the wild swings some of the math nodes here can. Still worth a quick preview if the two source schedules are very different shapes; blending a sharply peaked curve with a flat one can produce something that isn't quite either.

Sweeping t across a batch is a cheap way to explore the space between two schedules before committing to one specific blend for a full-resolution render.

CategoryRES4LYF/sigmas

Inputs (4)

NameTypeDefaultDescription
sigmas_aSIGMAS
sigmas_bSIGMAS
tFLOAT0.500–1
ensure_lengthBOOLEANtrue

Outputs (1)

NameTypeDescription
SIGMASSIGMAS