First/Last Frame Selector
Grab the first or last frame of a video batch
- images
- frame
A video batch in ComfyUI is just an IMAGE tensor with a batch dimension, and a lot of video workflows need exactly one specific frame out of it: the first frame to anchor an image-to-video generation, the last frame to chain one clip into the next, or either end as a preview thumbnail. First/Last Frame Selector is the two-input node that does precisely that and nothing else.
How it works
Feed it an images (IMAGE) batch and set mode - first or last. It returns that single frame as an IMAGE, one frame in, still shaped as a batch of one so everything downstream that expects a batch stays happy.
# first → images[0:1]
# last → images[-1:]
That's the whole mechanism. No cleverness, no interpolation, no model - which is exactly why it's reliable. It's the kind of node you forget exists until you need it.
Where you'll actually use it
- Image-to-video anchoring. Many i2v pipelines want the first frame passed alongside the prompt; this pulls it out of whatever batch you have.
- Last-frame chaining. The standard long-video trick is generate clip 1, take its last frame, and use that as the starting image for clip 2. This node is the "take its last frame" step.
- Endpoint review. Wire it to a preview before committing to a long render, so you can sanity-check what the first or last frame of a sequence actually looks like.
Notes
- It's genuinely tiny - one required input pair, one output (
frame, IMAGE). Don't go looking for advanced options; there aren't any. - Works on any IMAGE batch, not just decoded video frames. If you have a stack of images and want just the top or bottom one, this is the same node.
- Install with the pack: ComfyUI Manager → "ComfyUI Lackluster Nodes", deps
requests+numpy.
For a single-purpose utility this one earns its place in a video pipeline more often than its simplicity suggests. The last-frame-chaining use alone justifies knowing it exists.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| mode | COMBO | first | 2 options: first, last |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| frame | IMAGE | — |