LatentInterpolate_motorway_edition
Morph between two latents with one slider
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Latent interpolation is one of those tricks that sounds exotic and is actually just a weighted blend. This node takes two latent batches from your Motorway pipe and mixes them, with ratio controlling the mix. At 0 you get all of samples1, at 1 you get all of samples2, and anywhere in between is a proper morph - not just a crossfade of pixels, but a blend in the compressed space the diffusion model actually works in.
The thing people actually use this for: smooth transitions. Generate two keyframes, interpolate a stack of intermediate latents between them, decode them, and you've got a handmade video or a style-slider. It's also how you build "between" images for character consistency experiments, and it's the same primitive that fancier latent-walk setups are built on. Because the blend happens in latent space (where the model reasons), the middle frames come out coherent instead of looking like a dissolve.
The wrapper, quickly
LatentInterpolate_motorway_edition is a clone of the core node, adapted to read from and write back to the Motorway pipe. The relevant fields:
MOTORWAY 🚌💨- the pipe. Required.INPUT_samples1_key(defaultsamples1) - key for the first latent.INPUT_samples2_key(defaultsamples2) - key for the second latent.ratio(FLOAT, 0–1, default 1) - where on the blend you land.OUTPUT_LATENT_key(defaultLATENT) - where the blend is stored.
Note that both latents get pulled out of the same pipe, so whichever node upstream wrote samples1 and samples2 needs to have run first. A common setup is two parallel generation branches that both write their latent into the pipe, then this node blends them.
There's one subtlety in the underlying core node worth knowing: it doesn't do a naive pixel-average lerp. It interpolates the latents in a normalized, magnitude-aware way, which keeps the blend from collapsing toward gray and makes intermediate frames actually usable. The core logic also reshapes the second latent to match the first, so mismatched sizes won't explode - they get aligned first.
To turn the result into something you can see, pull the LATENT key back out with a Motorway AxB ramp and run it through VAEDecode like any latent.
Installing
The node ships inside the Motorway pack:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
# restart ComfyUI
Or ComfyUI Manager → search ComfyUI_agilly1989_motorway → Install. No model files, no extra pip packages - just the pack.
Gotchas
- Start the graph with
MotorwayStart(or a primitive likeMotorwaySeed) so there's a pipe to feed. - Keys are exact strings.
Key: 'samples2' doesn't exist in motorwaymeans nothing upstream stored that key - wire order matters, and in ComfyUI that means spatial order in your graph. - Beta caveats apply: the author's README literally says "IF THINGS BREAK ITS BECAUSE I BROKE IT," and the generated clone nodes have vanished from releases before during refactors. If the node isn't in your menu, check the pack's current version.
One honest note: for a single image you could do the same thing in pixels with an image-blend node. The latent version wins when you're interpolating between generated states or chaining several blends, because you never leave the space the model works in.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_samples1_key | STRING | samples1 | — |
| INPUT_samples2_key | STRING | samples2 | — |
| ratio | FLOAT | 1.000–1 | — |
| OUTPUT_LATENT_key | STRING | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |