Flex Latent Interpolate β‘π ‘π π £π
Travel smoothly between two latents
- latents
- latent_2
- opt_feature
- LATENT
Where Flex Latent Blend composites two latents with image-editor-style blend modes, Flex Latent Interpolate does something more specific: it walks a path between them. Feed it two latents - two different seeds, two different prompts encoded to the same shape, whatever - and it produces a point somewhere along the line connecting them, controlled by how far you tell it to travel. That's the classic "latent morph" technique people use for smooth transitions between two generated images or two keyframes of an animation.
How it works
interpolation_mode gives you two ways to travel that path: Linear, a straight-line average between the two latents, and Spherical (slerp), which travels along the surface of the hypersphere the latents roughly live on instead of cutting straight through it. Spherical interpolation is the one people generally reach for for perceptually smoother morphs over a larger distance - linear can pass through a "flatter," less coherent middle region when the two latents are far apart, while slerp tends to hold together better. With no separate ratio field in the schema, strength is your interpolation factor here - the tooltip's own framing ("higher values create more dramatic changes") reads naturally as "how far you travel from latents toward latent_2," with 0 staying close to the first and 1 landing on the second.
One thing worth knowing before you wire up reactivity: unlike its Blend and Noise siblings, this node's feature_param only offers None as a choice, per its own schema. There's currently no parameter exposed for a FEATURE input to actually modulate on this node - the opt_feature socket exists, but as shipped there's nothing for it to drive here.
Inputs and outputs that matter
latents/latent_2(required,LATENT) - the two endpoints of the interpolation.interpolation_mode- Linear or Spherical.strength(default 1, 0β1) - effectively your interpolation factor between the two latents.opt_feature(optional,FEATURE) - present, but with no modulatable parameter currently exposed on this node.- Output - a single
LATENT.
Installing it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart ComfyUI. Pure math on tensors you already have - no model downloads.
Common issues & troubleshooting
Shape mismatch. Same rule as any latent operation: latents and latent_2 need matching resolution and batch size, or you'll get a tensor-shape error before the interpolation math ever runs.
Wired opt_feature but nothing changes. That's expected as shipped, not a wiring mistake on your end - feature_param doesn't have a real target for this specific node yet, so a connected feature currently has no parameter to modulate. If you need frame-by-frame reactive control over an interpolation ratio, you'll get further using this node's strength value alongside a separately-scheduled input than expecting opt_feature to do the driving here.
Spherical looks weird on very similar latents. Slerp's advantage shows up over larger distances; if your two latents are already close (small seed variation, similar prompt), Linear and Spherical will look nearly identical - don't expect a dramatic difference in that case.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| strength | FLOAT | 1.000β1 | Overall strength of the effect (0.0 to 1.0) Higher values create more dramatic changes, while lower values are more subtle. |
| feature_threshold | FLOAT | 0.000β1 | Threshold for feature activation (0.0 to 1.0) |
| feature_param | COMBO | Choose which parameter of the effect to modulate Each effect type has different parameters you can control. Hover over each option to see what it does. | |
| feature_mode | COMBO | relative | How to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum |
| latents | LATENT | Input latent tensor to be processed (LATENT type) | |
| latent_2 | LATENT | Second latent tensor to interpolate with (LATENT type) | |
| interpolation_mode | COMBO | Linear | Method of interpolation ('Linear' or 'Spherical') |
| opt_featureopt | FEATURE | Optional feature input for modulation Connect any feature node here to control the effect. Features can come from audio, motion, color, or other sources. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |