ComfyUI Node

Get Frame (Soze)

Pull one frame out of a video without touching ffmpeg

By SozeInc·Created 2 years ago·Updated a day ago· 10
Get Frame (Soze)
  • images
  • video
  • image
  • frame_index
  • total_frames
  • status
frame_number0

Every video workflow eventually needs the same boring thing: one specific frame, extracted and handed to the graph as a regular image - to feed an upscaler, to become a reference for the next clip, to be the keyframe you design the rest of the shot around. That's this node's entire job, and it does it without you ever touching a command line. It's the rare node in the Soze pack that calls no API and needs no key; it just lives on your machine and slices tensors.

What it does

You tell it which frame, it gives you the frame. The control is one integer: frame_number, a 0-based index - so 0 is the first frame, 1 is the second, and -1 means the last frame. The "-1 = last" trick is the handiest thing here: you don't need to know how many frames a clip has to grab its final image.

Two ways to feed it:

  • images - an IMAGE batch, which is how ComfyUI usually passes video around between nodes anyway. Each batch item is a frame.
  • video - a VIDEO object. If images isn't connected, the node decodes the video to frames itself via ComfyUI's components API, with fallbacks for older versions.

If both are connected, images wins. Out-of-range indices don't error out - they're clamped to the nearest valid frame and the node notes it in the status. That's the kind of small robustness that keeps a workflow from dying at 1 a.m.

The outputs

Four outputs, and you'll mostly use two:

  • image - the single extracted frame as an IMAGE tensor. This is the one you wire onward.
  • frame_index - the index actually used (useful when you asked for -1 and want to know which frame you got).
  • total_frames - how many frames were in the source. Wire this to a text node if you're logging.
  • status - a summary string ("frame 12/30 (1280x720) from video [last]").

Where it earns its place

The classic pattern: a video generation node → Get Frame → feed the last frame into an upscaler or back into an image-to-video node as the next clip's start. It turns a chain of generated clips into something you can walk forward frame by frame. It also quietly replaces the whole "export a video, open it in a player, screenshot it" dance - the frame stays inside the graph as data, so you can iterate without round-tripping through files.

Install

Ships in the Soze pack ("Quality of Life Nodes for ComfyUI"). ComfyUI Manager → search "Soze", or:

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

Then restart ComfyUI. That's it - no key, no accounts, no model downloads.

Common issues

  • Skips with "no frames provided". Neither input is connected. Hook up images or video.
  • Wrong frame came out. Remember it's 0-based: frame_number 5 is the sixth frame. And -1 is last, not "one before last."
  • "Could not extract frames from the VIDEO input". The connected VIDEO object isn't one the node's decoder recognizes - feed it an IMAGE batch instead, or check which node produced the video.
Categoryimage

Inputs (3)

NameTypeDefaultDescription
frame_numberINT0-1–2684354550-based frame index. -1 = last frame.
imagesoptIMAGEVideo frames as an IMAGE batch.
videooptVIDEOA VIDEO object (decoded to frames). Used if 'images' is not connected.

Outputs (4)

NameTypeDescription
imageIMAGE
frame_indexINT
total_framesINT
statusSTRING