Nodes/ComfyUI-Pixaroma/First Last Frame Pixaroma
ComfyUI Node

First Last Frame Pixaroma

Turn the end of one video into the start of the next

By pixaroma·Created 5 months ago·Updated a day ago· 369
First Last Frame Pixaroma
  • video_frames
  • video
  • first_frame
  • last_frame

First Last Frame Pixaroma exists for one reason, and it's a good one: carry on from where a clip ended. You render a video, grab its last frame, feed that frame in as the starting picture for the next video, and the two clips join up. Repeat that and a long scene gets built out of short ones - the standard trick for extending any video model that won't go past its length limit.

The node takes a video and hands back the very first and very last frames as two images. Wire either into a Save Image to keep it; the last frame is the one that goes back into the next video as its start frame.

Two inputs because ComfyUI has two kinds of video

ComfyUI moves video around on wires in two different forms, and they don't fit the same slot:

  • video_frames (IMAGE) - a batch of frames, like the video_frames output of Load Video Pixaroma, or the frames coming straight out of a video model. Any image batch works; if a single image is wired in, first and last are both that image. Used in preference to the video input when both are connected.
  • video (VIDEO) - ComfyUI's own video type, such as the output of its core Load Video node, when the clip hasn't been turned into frames yet.

How it stays cheap

The genuinely nice part is in the implementation: for a video file, the node reads only the two frames it needs with ffmpeg, so pointing it at a long clip doesn't pull the whole thing into memory. The frames come out exactly as they are in the video - nothing resized, cropped, or recoloured, which matters because a start frame should be a pixel-for-pixel match for what the previous clip ended on.

Both outputs are IMAGE: first_frame and last_frame.

Install

Part of the Pixaroma pack - ComfyUI Manager → search Pixaroma → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://gitlab.com/pixaroma/comfyui-pixaroma.git

The video input path needs ffmpeg on your system or an installed imageio-ffmpeg; the pack finds it automatically and tells you if it can't. Frames out of Load Video Pixaroma need no ffmpeg at all. Same update gotcha as the rest of the pack: if the node renders blank after an update, hard-refresh the tab (Ctrl+Shift+R / Cmd+Shift+R).

One tip from actually chaining clips: don't just reuse the last frame blindly - feed it to your video model's image-to-video start input and keep the same prompt, or the seam shows even though the pixel matches.

Category👑 Pixaroma/🖼️ Image

Inputs (2)

NameTypeDefaultDescription
video_framesoptIMAGEA batch of video frames, such as the video_frames output of Load Video Pixaroma. Any image batch works. If a single image is wired in, the first and last frame are both that image. Used in preference to the video input when both are connected.
videooptVIDEOComfyUI's own video type, such as the output of its Load Video node. Use this input when the video has not been turned into frames yet. Only the two frames that are needed are read, so a long clip stays cheap.

Outputs (2)

NameTypeDescription
first_frameIMAGEThe very first frame of the video, as an image.
last_frameIMAGEThe very last frame of the video, as an image. This is the one to feed into the next video when you want the clips to join up.