Perfil do pacote
- Status
- Verificado
- Publicador
- @hndrr
- Fonte
- GitHub
README
Comfyui-SceneDetect
Comfyui-SceneDetect adds PySceneDetect-based scene detection to ComfyUI. The recommended node accepts ComfyUI's built-in VIDEO type and processes the source without materializing every frame as an IMAGE batch. A Legacy VHS node is retained for existing workflows. Both nodes return one representative image per scene, scene metadata as JSON, and the detected scene count.
Features
- Direct support for ComfyUI's built-in
Load VideoandVIDEOtype - Low-memory processing in the recommended node without materializing the complete video as a float32
IMAGEbatch - Backward-compatible Legacy VHS node for existing workflows
- Export one representative frame per scene as an
IMAGEbatch (choose start/middle/end) - Provide detailed scene metadata as JSON (frame numbers, timestamps, durations, etc.)
- Optionally store representative frames as JPEG thumbnails
- Return one scene and its representative frame when no cuts are detected (
scene_count = 1), for bothVIDEOand Legacy VHS. TrimmedVIDEOinputs cover only the selected trim window. - Choose from
content,adaptive,threshold,hash, andhistogramdetection methods. - Control the detection downscale factor while keeping representative images at their original resolution (unless
max_width/max_heightis set). - Keep PySceneDetect's default detector settings, or select
customto tune adaptive detection, content weights, and fade handling.
Requirements
- ComfyUI with built-in
VIDEOsupport for the recommended node - Python 3.10 or newer
- PySceneDetect 0.7 and OpenCV (installed through this package's dependency list)
- ComfyUI-VideoHelperSuite (VHS) only when using the Legacy VHS node
Installation
Installing from ComfyUI Manager also installs the Python dependencies listed below. For a manual clone:
-
Place this repository under the ComfyUI
custom_nodesdirectory.- Example:
ComfyUI/custom_nodes/Comfyui-SceneDetect
- Example:
-
Install the Python dependencies.
pip install -r requirements.txtThe
requirements.txtfile includes:scenedetect-headless>=0.7.1,<0.8opencv-python-headless>=4.9numpy
scenedetect-headlessprovides the samescenedetectPython module without GUI dependencies.PyTorch (
torch) ships with the standard ComfyUI installation, so it is intentionally not listed here. -
Restart ComfyUI.
Node Name and Category
- Node:
PySceneDetect: Video → Scenes(recommended, built-inVIDEOinput) - Legacy node:
PySceneDetect: Scenes → Images (Legacy VHS) - Category:
Video/PySceneDetect
Once installed, the node can be searched and placed directly inside ComfyUI.
Which node should I use?
| Recommended | Legacy | |
|---|---|---|
| SceneDetect node | PySceneDetect: Video → Scenes | PySceneDetect: Scenes → Images (Legacy VHS) |
| Loader | ComfyUI built-in Load Video | VHS Load Video (Upload) |
| Input | Lazy VIDEO | Full IMAGE batch + VHS_VIDEOINFO |
| Memory use | Only compressed video decoding and representative frames | VHS must keep the full float32 frame batch in memory |
| Use case | New workflows and long/high-resolution videos | Existing VHS workflows |
Inputs and Outputs
PySceneDetect: Video → Scenes
- Required inputs
video(VIDEO): Connect the output from ComfyUI's built-inLoad Videonode. The video is streamed from the compressed source instead of being expanded into a full frame batch.method(content|adaptive|threshold|hash|histogram): Scene detection method.hashcompares perceptual hashes;histogramcompares brightness distributions.threshold(FLOAT): Detection threshold used by thecontent/thresholdmethods.min_scene_len_sec(FLOAT): Minimum scene length in seconds. Values greater than zero overridemin_scene_len_frames.min_scene_len_frames
Nós neste pacote
Nó 1
Nós neste pacote
Nó 1- PySceneDetectVideo
Fontes
2 fontes
Fontes
2 fontesVerificado 10 de out.
Trechos de fonte
1 trecho
Trechos de fonte
1 trechoSource context: Repo hndrr/Comfyui-SceneDetect
