Audio Latent Interpolate
Morph one sound into another in the latent space
- latent_a
- latent_b
- latent
If you've ever envied the way image people slide a latent between "photo of a cat" and "photo of a dog" and get a chimera, this is your turn. Audio Latent Interpolate takes two audio latents and walks between them, so you can morph a kick drum into a sine wave, a rain loop into applause, or a vocal into a pad - and land anywhere in between.
How it works
It's pure latent-space math, and it's real: the node reads both latents, blends them on whatever curve you ask for, and hands back a new LATENT. The interesting part is the default mode, spherical (SLERP). Instead of blending in a straight line, it treats the latents as directions in a high-dimensional space and rotates between them along the sphere. That tends to avoid the muddy "averaged" sound that plain linear mixing gives you, because it respects the geometry of the space the VAE actually lives in. If two latents are nearly identical it falls back to linear automatically, so you won't hit the division-by-near-zero edge case.
There's also linear, cubic (smooth start/end, good for easing into a transition), and sine. If you want to bias the midpoint - linger longer at the start or punch through to the end early - the curve_power input reshapes the factor (factor ** curve_power). Leave it at 1 for a plain mix.
The inputs that matter
latent_a/latent_b- the twoLATENTs, from AudioVAEEncode or AudioReferenceEncoder. There's no size check at the port, but a mismatch in length will bite you on decode; encode your sources the same way.interpolation_factor- 0 to 1. 0 is all A, 1 is all B. This is the knob you'd animate if you're building a crossfade between scenes.interpolation_mode- leavesphericalunless you have a reason not to.curve_power- optional fine control over the curve.
Output is a single latent, ready for AudioVAEDecode. To make a real sweep, put the factor on an animated input (or just render a few stills at different factors and pick the one that's not embarrassing).
Installing it
Part of the DavidPiazza/network_bending pack. Via ComfyUI Manager, search "Network Bending"; or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/DavidPiazza/network_bending.git
Restart ComfyUI. Being an audio node, it needs torchaudio and librosa from the pack's requirements-audio.txt - without them the audio nodes don't show up at all (the pack disables them gracefully rather than failing the whole load).
Common issues
The two things that actually go wrong here: feeding it latents from different sources or sample rates, and decoding a factor exactly at 0 or 1 (which is fine, just pointless - you already had that audio). Mostly, though, interpolation is the friendliest node in this pack: no model surgery, no fragility, just a slider between two sounds. If you're poking at the audio side of network_bending for the first time, this is a good place to start.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_a | LATENT | First audio latent | |
| latent_b | LATENT | Second audio latent | |
| interpolation_factor | FLOAT | 0.500–1 | Interpolation factor (0=A, 1=B) |
| interpolation_mode | COMBO | spherical | Interpolation method |
| curve_poweropt | FLOAT | 1.00.1–10 | Power curve for non-linear interpolation |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |