Latent Interpolate π
Walk Between Two Latents Frame by Frame
- latent_a
- latent_b
- latent
- walk_info
Latent Interpolate is the engine behind every "watch a woman melt into a dragon" animation you've seen come out of ComfyUI. You feed it two latents - say, one from prompt A, one from prompt B - and it produces a whole stack of latents stepping between them. Feed that stack to a batched KSampler and a VAE decode and you get a smooth morph, with the diffusion model doing the work of keeping each intermediate frame coherent. It's the difference between a crossfade (which is just two images fading) and an actual transition (which is a sequence of things that could each be a real image).
How it works
The two knobs that matter:
- method -
lerpis plain linear interpolation: fast, and it can dip in "energy" (magnitude) when A and B are far apart, which tends to make mid-frames look washed out.slerpinterpolates over the flattened vector while holding magnitude roughly constant - generally the better choice for diffusion latents, because the latent space isn't a flat Euclidean grid and slerp respects its curvature better. - easing -
linear,ease_in,ease_out,ease_in_out. This reshapes the spacing of the steps, not the math: ease_in spends more frames near A and rushes toward B, which gives you that long slow transformation that speeds up at the end.
steps is how many latents you want in the walk (default 8), and include_endpoints keeps A and B themselves in the output.
One honest caveat baked into the node: only the first batch item of latent_a and latent_b is used. If either input has batch size > 1, the rest is ignored. For the common case - two single-image encodes - that's exactly what you want.
Inputs and outputs
- latent_a / latent_b - the two endpoints.
- steps, method, easing, include_endpoints - the controls above.
- latent - a single LATENT with
stepsbatch items, ready for a batched sampler. walk_info - a text summary.
The whole point of the batch output is that you don't build N separate sampler chains. One KSampler set up for batched input, one VAE Decode, one Save - ComfyUI runs the whole walk.
Where it earns its keep
Animations are the headline use: encode the same image at two prompts, interpolate, sample, and you've got a prompt-transition video. It's also how people build "style drift" sequences - interpolate between a base and a heavily styled latent and watch the style fade in. Audio-reactive workflows use the same pattern with a per-frame strength curve driving a series of blends (the pack's Audio-to-Latent Modulator plays in this neighborhood).
The trap to avoid: interpolating between two latents of different content and composition often produces mushy mid-frames, because there's no clean correspondence between them. Interpolation works best when the endpoints share structure - same subject, different style - and worst when it's trying to morph a cat into a cityscape.
Install and troubleshooting
No extra dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes
Restart and look under TensorVizion/Latent (ComfyUI Manager, search "OmniNodes", also works).
- Mid-frames look washed out - switch from
lerptoslerp, and/or lower the KSampler denoise so the sampler leans on the endpoints. - Only one frame comes out - your downstream sampler isn't set for batched input, or the batch got collapsed somewhere. Check that the latent really has
stepsitems (thewalk_infooutput tells you). - Endpoints differ wildly - expect a rocky middle. Interpolate between similar compositions, not random pairs.
For a beginner, this is one of the most rewarding nodes in the pack: it's a one-node path to real animation, and it teaches you, viscerally, that the latent space is a place you can move around in.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_a | LATENT | β | |
| latent_b | LATENT | β | |
| steps | INT | 82β64 | β |
| method | COMBO | 2 options: slerp, lerp | |
| easing | COMBO | 4 options: linear, ease_in, ease_out, ease_in_out | |
| include_endpoints | BOOLEAN | true | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | β |
| walk_info | STRING | β |