Nodes/ComfyUI-SuiteTea/Tea: Load Frame from Video as Image
ComfyUI Node

Tea: Load Frame from Video as Image

Grab any frame from a video and feed it straight into your pipeline

By teepunkt-esspunkt·Created about a year ago·Updated 12 months ago· 4
Tea: Load Frame from Video as Image
    • image
    • saved_path
    • picked_index
    video
    modelast
    video_path
    frame_index0
    time_sec0.00
    max_side0
    save_pngfalse
    save_path
    overwritetrue

    Every image-to-video workflow needs a starting frame, and most of the time that frame is the last frame of a clip you're trying to extend. This node pulls a single frame out of any video and hands it to ComfyUI as a normal IMAGE tensor - no manual extraction in an editor, no dumping a whole clip to PNGs, no ffmpeg command-line gymnastics. Pick the video, pick the mode, and you get a still ready to wire into a VAE Encode or an i2v sampler.

    It's part of the same small "nodes for bad reasons" pack as its siblings, and like them it's genuinely useful for the niche it targets: extending clips frame-by-frame on modest hardware, or snapshotting a reference moment you'll want later.

    How it works

    Four modes, and the default last is the one you'll reach for most:

    • first - frame 0.
    • last - the final frame, fetched by seeking 50ms from the end (-sseof -0.05). That offset is deliberate: asking ffmpeg for the literal last frame often returns a black or corrupted one.
    • index - frame N, counting from 0.
    • time - the frame at N seconds (2.5, not 2500).

    Under the hood it prefers ffmpeg - it shells out and pipes a single PNG out - and falls back to OpenCV (cv2) if ffmpeg isn't on PATH. The output is a CPU tensor, so VRAM only gets touched when you feed it into a VAE or model. That's a real design choice for video work on small cards.

    The inputs that matter

    • video - the picker, with an upload button that drops videos into ComfyUI/input. video_path is an optional override that takes precedence if both are set.
    • mode - first / last / index / time.
    • time_sec (for time) or frame_index (for index).
    • max_side - 0 means no resize; otherwise it downscales keeping aspect ratio using area interpolation. Handy when your clip is 4K but your model wants 1024.
    • save_png - toggle to also write the frame to disk. With save_path left empty it auto-names to output/tea_frames/<video>_<tag>.png; overwrite controls whether it clobbers existing files.

    Outputs: image (the still), saved_path (empty if save_png is off), and picked_index (the frame number in index mode, -1 otherwise).

    One gotcha the README trips over: it describes save_png as a string, but the shipped node has it as a checkbox with a separate save_path text field. Trust the node, not the README.

    Installing it

    The pack has no requirements.txt, so install is just getting the repo in place:

    • ComfyUI Manager → Custom Nodes → search "SuiteTea", or Manager → Install from URL → https://github.com/teepunkt-esspunkt/ComfyUI-SuiteTea.git
    • Or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/teepunkt-esspunkt/ComfyUI-SuiteTea
    

    Then restart ComfyUI.

    The ffmpeg catch

    Nothing in the pack installs ffmpeg for you. If it's not on PATH, you get Failed to extract frame. Ensure ffmpeg is on PATH or install opencv-python. Fix it one of two ways:

    # ffmpeg is the faster, more robust option
    winget install ffmpeg        # Windows, or grab the gyan.dev build
    sudo apt install ffmpeg      # Debian/Ubuntu
    

    …or pip install opencv-python to lean on the fallback. For serious video work, get ffmpeg - the OpenCV path is slower and less reliable on odd codecs. Once it's in place, this node quietly does one job well: frame in, IMAGE out, no mess.

    CategorySuiteTea/IO

    Inputs (9)

    NameTypeDefaultDescription
    videoCOMBO0 options:
    modeCOMBOlast4 options: first, last, index, time
    video_pathoptSTRING
    frame_indexoptINT0
    time_secoptFLOAT0.00
    max_sideoptINT00–8192
    save_pngoptBOOLEANfalse
    save_pathoptSTRING
    overwriteoptBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    saved_pathSTRING
    picked_indexINT