2cc6cbe80982eebc016cd4f092c6d2841e7177f3
VideoFrameNode (ComfyUI)
Custom node for ComfyUI that loads an MP4 video and outputs two images:
- first frame
- last frame
Install
-
Copy/clone this repo folder into your ComfyUI:
ComfyUI/custom_nodes/VideoFrameNode(this repo root is the node folder)
-
Install dependencies:
pip install -r requirements.txt
Note about
torch/ PylanceThis node uses `torch` because ComfyUI images are `torch.Tensor`. If Pylance shows `Import "torch" could not be resolved`, install dependencies from `requirements.txt`. -
Restart ComfyUI.
Publishing / Compatibility notes
- This repo includes
pyproject.tomlfor Comfy Registry / ComfyUI-Manager publishing. Fill inPublisherIdandRepositorybefore publishing. - Versioning: follow SemVer. Changing node identifiers, input names, output names, or types should be treated as a breaking change.
- Security: no
eval/exec, no runtimepip installfrom within the node. - API-mode: the core node works in API mode, but the drag&drop upload feature is UI-only (it adds a custom upload route + frontend JS).
Publish to Registry (GitHub Actions)
- Create a Registry publishing API key and add it as a GitHub repo secret named
REGISTRY_ACCESS_TOKEN. - Ensure
pyproject.tomlhas the correctPublisherIdandRepository. - Bump
versioninpyproject.tomland push tomain.
Node
- Name: Video: First & Last Frame
- Input:
video(filename inComfyUI/inputor an absolute path) - Outputs:
FIRST_FRAME,LAST_FRAME(ComfyUIIMAGE)
Drag & drop workflow
- Drag & drop your
.mp4directly onto the node. - The file is uploaded into
ComfyUI/inputand the node input is set to the uploaded filename. - The node displays a preview (first frame) after execution.
Languages
Python
60.4%
JavaScript
39.6%