Nodes/comfyui-lrw-nodes/Latent Blend / Frame Select (LRW)
ComfyUI Node

Latent Blend / Frame Select (LRW)

The name says blend. It selects.

By lajjadred·Created 3 months ago·Updated 3 months ago· 12
Latent Blend / Frame Select (LRW)
  • latent_path
  • latent
frame_index5
total_frames10

Let's get the headline out of the way: despite the name and the README's "Selects or blends latent frames," this node does not blend anything. It slices. You feed it the stacked latent path that LRW_GeodesicInterpolate or LRW_SlerpInterpolate produces, tell it which frame you want, and it hands you that one latent back as a clean LATENT. That's the entire job. Frame selector with a marketing problem.

Which is not to say it's useless - it's actually the node that makes geodesic interpolation usable. The interpolators hand you a stack of n_points × B latents in one tensor, and KSampler wants a single latent (or a batch you control). This is the bridge between the two.

The inputs

  • latent_path - the stacked output of an interpolator. Shape (n_points * B, C, H, W).
  • frame_index (default 5) - which frame to pull. 0 is the first intermediate frame.
  • total_frames (default 10) - the number of frames in the path. This is how the node figures out where one "frame" ends and the next begins, so it needs to match the n_points you used upstream. Get it wrong and you'll slice a weird mixed-up batch.

Output is a single latent - (B, C, H, W) - ready for KSampler, VAEDecode, or whatever's next.

The honest gotcha

Because it indexes into the stack using frame_index * B, this node assumes your latent path was built with a consistent batch size throughout. With B = 1 (the common case) it's bulletproof: frame_index 3 just grabs the fourth frame. With a real batch it still works, but frame_index selects a block of B frames, not one frame. Worth remembering when you're mid-experiment and the output suddenly has more than one image in it.

Also, since it clamps the index to total_frames - 1, an out-of-range frame_index won't error - it'll silently give you the last frame. That's usually what you want for a loop-back convenience, but it can also mask a typo. If your morph is inexplicably identical to the endpoint, check that number.

Where it fits

This is one of the lrw/core bridge nodes in lajjadred's comfyui-lrw-nodes - the pack that fronts his latent-riemannian-world geometry package. It's the image-model counterpart to the WAN side's LRW_LatentKeyframePicker, which does the same select-a-frame job but with a wan_5d output mode so WAN's VAEDecode doesn't crash on a 4D latent. Same instinct, different shape requirements.

Install

Search comfyui-lrw-nodes in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lajjadred/comfyui-lrw-nodes
cd comfyui-lrw-nodes
pip install -r requirements.txt

Restart ComfyUI. The real dependency is latent-riemannian-world >= 0.3.0 plus torch >= 2.4; Python 3.12+ per the project config. Early versions of the pack had a node-registration bug that made things show up broken/UNKNOWN - git pull, full restart, and make sure you've only got one copy of the pack in custom_nodes. License is BSL-1.1.

Categorylrw/core

Inputs (3)

NameTypeDefaultDescription
latent_pathLATENT
frame_indexINT50–63
total_framesINT102–64

Outputs (1)

NameTypeDescription
latentLATENT