Nodes/MediaMixer/Final Frame Selector
ComfyUI Node

Final Frame Selector

Grab the last frame to extend a video

By DoctorDiffusion·Created 2 years ago·Updated 2 years ago· 41
Final Frame Selector
  • images
  • IMAGE

Final Frame Selector is a one-trick node, and the trick is the whole reason people extend video in ComfyUI: it takes a clip and hands you back its last frame as a single image. That's it. But that last frame is the seed for everything that comes next, because the standard way to make a video longer than your model's native clip length is to grab where it ended and generate forward from there.

It ships in DoctorDiffusion's MediaMixer pack, and it's quietly one of the more-used nodes in the whole suite. The reason is simple: every open video model - LTX-Video, Wan, CogVideoX, Pyramid-Flow - has a hard ceiling on how many frames it'll make in one pass. Five seconds, maybe ten. Want thirty? You chain. And chaining starts here.

How the extend loop works

Remember that in ComfyUI a "video" is just a batch of IMAGE frames. Final Frame Selector reaches into that batch and pulls out the final one. You then feed that single image into an image-to-video pass - the same model, now conditioned on your last frame as its starting point - and it generates the next clip. The README calls this out directly: it "works great for extending video with image-to-video tools like Pyramid-Flow, CogVideoX, and LTX-Video." Then you stitch the original and the continuation back together with Video Merge (also in this pack), and you've got a clip twice as long. Repeat as needed.

This is a genuinely common real-world pattern. It's how people push past the five-second wall - extract the last frame, run another sampler pass off it, merge, and if you want sixty seconds you just keep chaining (a Clear VRAM node between the passes so you don't OOM). LTX's native keyframe conditioning does a fancier version of the same idea, but for models without it, or when you want manual control over each segment, the frame-selector approach is the workhorse.

Inputs and outputs

Blessedly simple:

  • images (IMAGE) - the clip you want the last frame of. Wire in the frame batch from your sampler or a Load Video node.

The single IMAGE output is that final frame, on its own. It goes straight into the image input of your image-to-video node, or into an upscaler first (more on that below), or into a Save Image if you just want a clean poster frame from a render.

There are no settings to tune. You don't pick which frame - it's always the last one. If you want the first frame instead, that's this node's sibling, First Frame Selector; if you want an arbitrary index, you're looking at a different pack.

Installing it

Via ComfyUI Manager: search MediaMixer, install, restart. Or manually:

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

then restart. No model downloads - it's pure utility.

The catch nobody warns you about

The node works perfectly. The workflow it enables has a well-known weakness, and you should walk in expecting it: quality degrades at the seam. Every time you extend from a generated frame, the second clip comes out a touch blurrier than the first, and video models love to subtly redraw details - eye color, facial structure - the moment they start from your handoff frame. Chain enough segments and it compounds visibly; it tends to become obvious past roughly eighty frames of accumulated generation.

The community's standard mitigation is to upscale the extracted frame before feeding it forward - run the Final Frame Selector output through a RealESRGAN or similar upscaler, so the model conditions on a sharp image instead of a soft one. It helps, though it doesn't fully cure the drift. Heavy prompt weighting toward "preserve the original appearance" is the other lever people reach for. Neither is a magic fix, but together they buy you a lot more usable length before the clip visibly falls apart.

Category🎬🔀MediaMixer

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE