Nodes/ComfyUI-Arisu-Nodes/Extract Last Images
ComfyUI Node

Extract Last Images

The one-node way to grab a video's ending frame

By swqa7697·Created 5 days ago·Updated about 12 hours ago· 4
Extract Last Images
  • images
  • images
count1

Extract Last Images keeps the last N images of a batch and drops the rest. That sounds trivial until you're staring at a decoded video clip and want exactly its ending frame - to preview it, to feed back into a workflow, or to use as the first keyframe of the next clip. Batch slicing exists in core ComfyUI, but grabbing the tail of a video decode is normally a small stack of nodes: a frame-count read, a subtraction, a batch split. This is that whole chain compressed into one node with one count widget.

Its natural home is video work, and in particular MiniMax H3 keyframing. A common H3 pattern is to generate clip A, decode it, grab the last frame, and hand that frame to the next generation as a first_frame keyframe so the motion carries over between shots. That "last frame" is exactly this node with count = 1. The pack's own docs frame it that way, and it works just as well for grabbing a stack of frames to stitch into a preview grid.

The inputs and outputs that matter

  • images - the batch, typically decoded frames from a VAE Decode.
  • count - how many images to keep from the end, default 1. It's capped at the batch size, so asking for more than the batch holds returns the whole batch rather than erroring - which is precisely the edge case the manual node chain tends to blow up on.
  • images (output) - the last count images, in their original order.

One detail worth knowing: the output is a copy. Downstream nodes can crop, paste, or edit it without touching the source batch, which matters when the same decode feeds several branches.

Wiring it

VAE Decode ─▶ Extract Last Images (count = 1) ─▶ Preview Image

For an arbitrary window instead of the tail, use core's Get Image from Batch (batch_index, length), which counts from the front. This node is specifically for "the end of the thing I just decoded."

Installing it

Extract Last Images is part of ComfyUI-Arisu-Nodes (swqa7697, GPL-3.0, released September 2026). The pack has zero runtime dependencies - no pip install, no model downloads - and registers pure V3 nodes with nothing patched in ComfyUI itself. Via Manager: Manager → Install Custom Nodes → "ComfyUI-Arisu-Nodes". Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/swqa7697/ComfyUI-Arisu-Nodes.git

Restart ComfyUI; the node lives under Add Node → Arisu Nodes.

Gotchas

There isn't much to break here, which is the point of the node. The only surprise is the cap behavior - count greater than the batch size silently returns everything, so if you expected an error or an empty result you won't get one. If you're pairing it with MiniMax H3 keyframing, note that the frame you pull is a decoded (pixel-space) frame, so it gets re-encoded by the H3 video VAE on the way in - fine in practice, just know the keyframe is a reconstruction, not the model's raw latent.

A niche node, honestly. But when you're chaining video clips by their end frames, it saves you a three-node tower every single time.

CategoryArisu Nodes/Common

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEAn image batch, for example the decoded frames of a video.
countINT11–4096How many images to keep from the end of the batch; capped at the batch size.

Outputs (1)

NameTypeDescription
imagesIMAGEThe last count images, in their original order.