LatentInterpolate
Morph between two images, cleanly
- samples1
- samples2
- LATENT
Latent Interpolate blends two latents toward each other with a single ratio - the latent-space equivalent of a crossfade, but smarter than averaging pixels. It's the node you reach for when you want a smooth transition between two images, or a "what's in between these two" exploration. Instead of a straight elementwise mix, it does a proper spherical interpolation: it normalizes each latent by its own magnitude, blends the directions, renormalizes, and rescales by the blended magnitude. The reason that matters is that naive averaging drags latents toward zero magnitude and produces washed-out garbage when decoded - the spherical version keeps the output in a healthy part of latent space.
The three inputs:
- samples1 / samples2 - the two latents.
- ratio - 0.0 to 1.0. The source computes
samples1 * ratio + samples2 * (1 - ratio), so 1.0 means "all samples1" and 0.0 means "all samples2". You'll usually be setting 0.3–0.7 for the in-between frames.
Output is a single LATENT that decodes to the morph.
The workflow that makes it shine
Generate two images with the same seed, same settings, different prompts - two latents that "share a language" - then sweep the ratio from 0 to 1 in a loop, decoding each step, and you've got a morph sequence. It's the backbone of a lot of "AI transition" videos and the classic way to explore the direction between two concepts without regenerating. The reason it works better than blending images: latents live in the model's own coordinate system, so an interpolation between them moves through plausible image territory, whereas pixel-space crossfades just ghost two photos over each other.
Where it trips people up
First, the default ratio is 1.0 - the output is samples1 unchanged. Forgetting to move it off the default is the single most common "why didn't anything happen" report. Second, the node reshapes samples2 to match samples1's shape, so mismatched resolutions get squished rather than rejected - fine for a same-size pair, a silent surprise otherwise. Third, it doesn't require the latents to be related, and if you interpolate between two unrelated images you get the classic "melting face" intermediate, which is a feature if you wanted it and a bug if you didn't. Finally, the interpolation happens in latent space, not in frames: this is for images, not for blending two video clips frame-by-frame.
It ships with ComfyUI core - no install. It's a small node that quietly does more math than it looks like, which is why "generate two, interpolate, decode" is such a reliable little demo to pull out when you want to show someone what latent space actually means.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| samples1 | LATENT | — | |
| samples2 | LATENT | — | |
| ratio | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |