comfyui-videoframenode
ComfyUI custom node: load an MP4 and output first/last frame as IMAGE.
VideoFrameNode for ComfyUI
![]()
Video: First & Last Frame extracts the first and last frames of an MP4 or an image batch. Both outputs, FIRST_FRAME and LAST_FRAME, are ComfyUI IMAGE values.
Usage
- Add Video: First & Last Frame from the video category.
- Choose a source:
- Enter a filename from
ComfyUI/inputor an absolute path to an MP4 invideo. - Choose an MP4 from the
recentdropdown. It shows up to 50 MP4s from the top level of the ComfyUI input and output folders. Use Refresh to update the list. - Use Browse… or drop an MP4 onto the node to upload it to the ComfyUI input folder. If the name is already in use, the upload gets a numbered suffix and the node selects the new file.
- Connect a native
VIDEO, a path string, a dictionary containing a path or filename, or anIMAGEbatch tovideo_in. A supported wired input takes precedence overvideo.
- Enter a filename from
- Connect the frame outputs you need and queue the workflow. For MP4 files, the node also shows a preview of the first frame.
When submitting a workflow through the API, set video to a path on the ComfyUI server (for example, input/clip.mp4 or output/clip.mp4) or wire a supported video_in. The file picker, drag and drop, and recent list are browser controls.
Install with ComfyUI Manager
- Open Manager and search for
comfyui-videoframenode. - Install the node and restart ComfyUI.
Manual installation
-
From ComfyUI's
custom_nodesdirectory, run:git clone https://github.com/esp-dev/comfyui-videoframenode.git -
If dependencies are missing, install them using the Python interpreter that runs ComfyUI. Run one of the following commands from the new
comfyui-videoframenodedirectory. Replace the example paths with your actual paths.Windows Portable (PowerShell, bundled Python)
& "C:\ComfyUI_windows_portable\python_embeded\python.exe" -m pip install -r requirements.txtWindows with a virtual environment (PowerShell)
& "C:\ComfyUI\.venv\Scripts\python.exe" -m pip install -r requirements.txtLinux or macOS with a virtual environment
"/path/to/ComfyUI/.venv/bin/python" -m pip install -r requirements.txtIf your ComfyUI environment uses uv, for example a Desktop environment without pip, use
uv pip installand point it at ComfyUI's existing interpreter:uv pip install --python "C:\path\to\ComfyUI\.venv\Scripts\python.exe" -r requirements.txtAdd
--dry-runto preview the dependency changes. If the resolver proposes changing NumPy or other packages used by your ComfyUI setup, review those changes before installing. Avoiduv syncanduv pip syncfor this installation. Syncing can remove packages outside the project's dependency list, including ComfyUI's PyTorch build. The node uses the PyTorch already provided by ComfyUI. -
Restart ComfyUI.