Nodes/RyanOnTheInside/Embedding Guided Latent Interpolate βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Embedding Guided Latent Interpolate βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Blend two latents, steered by embeddings instead of a fixed ratio

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Embedding Guided Latent Interpolate βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • latents
  • latent_2
  • embedding_1
  • embedding_2
  • opt_feature
  • LATENT
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„interpolation_modeLinearβ–Ί

Plain latent interpolation is a straight line: blend latent A and latent B at some fixed percentage. This node adds two things on top of that basic idea - it takes an EMBEDS pair alongside the latents to guide the interpolation, and, like the rest of RyanOnTheInside's Flex nodes, it can let a reactive signal control the blend over time rather than sitting at one static ratio for a whole sequence.

How it works

You give it two latents and two corresponding embeddings, pick Linear or Spherical interpolation, and it blends between them. Spherical interpolation (slerp) follows the curved path along the embedding space rather than a straight Euclidean line between two points - the standard choice when you're interpolating between semantically meaningful vectors rather than arbitrary numbers, since it tends to preserve magnitude and avoid the "dip in the middle" that linear blending can produce between very different embeddings.

The inputs and outputs that matter

  • latents and latent_2 (LATENT, required) - the two latents to interpolate between.
  • embedding_1 and embedding_2 (EMBEDS, required) - the embeddings associated with each latent, used to guide the blend.
  • interpolation_mode (default Linear, choices Linear / Spherical) - pick spherical if your embeddings represent meaningfully different concepts; linear if you just want a straightforward numeric blend.
  • strength (default 1, 0–1) - per its tooltip, "higher values create more dramatic changes, while lower values are more subtle." Overall effect intensity.
  • feature_threshold (default 0, 0–1) - minimum feature activation before the effect applies.
  • feature_param - the schema exposes interpolation_mode or None here, meaning a reactive FEATURE signal can actually flip between Linear and Spherical interpolation dynamically if you want that, rather than just modulating a numeric value.
  • feature_mode (relative / absolute, default relative) - relative changes are centered on your set values; absolute scales from zero to the max.
  • opt_feature (optional, FEATURE) - the reactive input, drawing from "audio, motion, color, or other sources" per its tooltip.
  • Output - a single LATENT.

How to install it

Via ComfyUI Manager: search "RyanOnTheInside," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart ComfyUI. No model downloads needed for this node specifically.

Common issues & troubleshooting

Blend looks identical to a plain latent average. Check strength isn't set too low, and confirm your two embeddings are actually different - if embedding_1 and embedding_2 represent nearly the same thing, the guided interpolation won't diverge much from a naive blend regardless of mode.

Spherical mode produces weirder results than expected. Slerp assumes the embeddings are reasonably well-behaved vectors in a shared space - if embedding_1 and embedding_2 come from very different sources or scales, the spherical path can behave unpredictably. Try Linear as a sanity check if Spherical is giving you artifacts you can't explain.

feature_param set to interpolation_mode but nothing seems to switch. This is a categorical modulation, not a smooth numeric one - a continuous feature curve is being used to decide which discrete mode is active at each point, gated by feature_threshold. If your feature signal never crosses that threshold, you'll never see it flip.

Output latent looks broken or noisy regardless of settings. Make sure both latents are actually compatible in shape/resolution - this node interpolates, it doesn't resize or reconcile mismatched latents, so feeding it two latents from different resolutions or pipelines is a likely cause of garbage output that has nothing to do with the interpolation settings themselves.

CategoryRyanOnTheInside/FlexFeatures/Targets/Latents

Inputs (10)

NameTypeDefaultDescription
strengthFLOAT1.000–1Overall strength of the effect (0.0 to 1.0) Higher values create more dramatic changes, while lower values are more subtle.
feature_thresholdFLOAT0.000–1Threshold for feature activation (0.0 to 1.0)
feature_paramCOMBOChoose 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_modeCOMBOrelativeHow to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum
latentsLATENTInput latent tensor to be processed (LATENT type)
latent_2LATENTSecond latent tensor to interpolate with (LATENT type)
embedding_1EMBEDSFirst embedding tensor for guidance (EMBEDS type)
embedding_2EMBEDSSecond embedding tensor for guidance (EMBEDS type)
interpolation_modeCOMBOLinearMethod of interpolation ('Linear' or 'Spherical')
opt_featureoptFEATUREOptional 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)

NameTypeDescription
LATENTLATENTβ€”