Nodes/RES4LYF/Frame Select Latent
ComfyUI Node Runs on cloud

Frame Select Latent

Pull one frame out of a batch as a latent

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Frame Select Latent
  • frames
  • latent
select0

This is a small plumbing node for video work. You feed it a stack of frames and an index, and it hands back the one frame you picked - as a LATENT, ready to drive the next stage of a workflow. The obvious use: grab a specific frame out of a generated clip (the last one, a keyframe) to seed or guide a follow-on generation, so a new segment continues from where the previous one left off.

It lives in RES4LYF (by ClownsharkBatwing). The pack leans heavily into video and specifically Wan - the readme covers temporal conditioning (changing the prompt frame by frame), regional conditioning, and video-to-video editing - and utilities like this exist to move frames around inside those multi-stage video graphs.

How it works

A batch of frames in ComfyUI is just an image tensor with a frame dimension. Frame Select Latent indexes into that stack, pulls the frame at your chosen position, and produces a latent for it downstream. Because the output is a latent rather than a plain image, it drops straight into the places a video or img2img workflow wants a latent - an init for a sampler, a guide reference, the anchor for the next window of a long generation.

The inputs and output

There are only two inputs, which is the whole appeal:

  • frames (IMAGE) - the batch of frames to pick from, typically the output of a video generation or a loaded clip.
  • select (default 0) - the index of the frame you want. 0 is the first frame; count up from there to reach a specific one (a common move is selecting the final frame to continue a sequence).

The single output is latent (LATENT) - wire it into whatever consumes a latent next.

Installing it

ComfyUI Manager: search RES4LYF, install, restart. Or from a terminal: cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF, then cd RES4LYF && pip install -r requirements.txt if you run a venv (portable ComfyUI uses its embedded pip). Restart, hard-refresh with F5. No model files for the node itself, though the surrounding video workflows (Wan especially) bring their own heavyweight model requirements.

Where people get burned

  • Off-by-one on the index. select is zero-based. If you want the last frame of an N-frame clip, that's index N-1, not N - an out-of-range index won't give you what you meant.
  • Expecting it to hold an image. The output is a latent. If a downstream node wants an IMAGE, you'll need to decode or route accordingly; this node is built to feed the latent side of a graph.
  • Using it outside a video context. It earns its keep in multi-stage / windowed video generation (the pack's Wan features). For a plain single image you almost certainly don't need it.
  • Won't load. It's a RES4LYF node - the pack has to be installed for ComfyUI to find it.
CategoryRES4LYF/latents

Inputs (2)

NameTypeDefaultDescription
framesIMAGE
selectINT00–10000

Outputs (1)

NameTypeDescription
latentLATENT