Nodes/ComfyUI Noise/Slerp Latents
ComfyUI Node Runs on cloud

Slerp Latents

Blending two latents without flattening either one

By BlenderNeko·Created 3 years ago·Updated 2 years ago· 321
Slerp Latents
  • latents1
  • latents2
  • mask
  • LATENT
factor0.50

Slerp Latents blends two batches of latents - usually two batches of noise - along the surface of a sphere instead of a straight line between them. That distinction matters more than it sounds. Linearly averaging two noise samples pulls the result toward the center and quietly shrinks its magnitude, which is exactly the kind of subtle-but-wrong move that makes blended noise look flatter and less lively than either input. Spherical interpolation (slerp) keeps the magnitude where random noise expects it to sit, which is why it's the tool for nudging a generation toward a variation without draining the character out of it.

How it works

It walks the shorter arc between latents1 and latents2 on the hypersphere, weighted by factor, rather than cutting a straight chord through the middle. If the two inputs don't share the same dimensions, the node doesn't try to force it - it just passes latents1 through untouched and ignores factor entirely, no error thrown. Any extra baggage riding along with the latents, like a mask, comes only from latents1; latents2 contributes noise and nothing else.

The inputs and outputs that matter

latents1 is required and is the "base" - what you get back if anything goes wrong. factor (default 0.5, range 0–1) is how much of latents2 gets slerped in. latents2 and mask are both optional: leave latents2 empty and there's nothing to blend, and mask lets you confine the slerp to part of the latent instead of the whole thing. Output is a single LATENT.

The pack's own worked example is the clearest way to actually use this node: take the noise for a seed you like, duplicate it into a batch, generate a second batch of fresh noise, then slerp a little of that second batch into the first at a low factor. What comes out reads as a handful of controlled variations on your original seed, instead of unrelated rolls - a genuinely nicer knob than just changing the seed and hoping for the best.

How to install it

Search "ComfyUI Noise" in ComfyUI Manager, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/BlenderNeko/ComfyUI_Noise

Restart ComfyUI. No models, no heavy dependencies - this is the same lightweight math pack as the rest of these nodes.

Common issues & troubleshooting

The silent no-op is the trap to know about up front: mismatched shapes between latents1 and latents2 don't error, they just skip the blend and hand you latents1 back unchanged. If a slerp seems to be doing nothing, check your batch sizes and dimensions before you assume factor is broken.

A factor around 0.5 is a genuine 50/50 blend, which on two batches of pure noise reads as an almost entirely new sample rather than a subtle push - for the seed-variation use case above, keep it low, something like 0.1–0.3, and only raise it once you've confirmed you want more drift than that.

One more thing worth knowing if you're following the pack's own example workflow rather than building from scratch: it references a Duplicate Batch Index node that used to ship in this same pack and has since been folded into ComfyUI core as Repeat Latent Batch and Latent From Batch. If an older shared workflow is missing that node, that's why - swap in the core replacements and it works the same.

Categorylatent

Inputs (4)

NameTypeDefaultDescription
latents1LATENT
factorFLOAT0.500–1
latents2optLATENT
maskoptMASK

Outputs (1)

NameTypeDescription
LATENTLATENT