Ir para o conteúdo
Node packVerificadoExterno
Fonte aberta

Comfyui-SceneDetect

Mantenedor@hndrrUnratednota

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 Video and VIDEO type
  • Low-memory processing in the recommended node without materializing the complete video as a float32 IMAGE batch
  • Backward-compatible Legacy VHS node for existing workflows
  • Export one representative frame per scene as an IMAGE batch (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 both VIDEO and Legacy VHS. Trimmed VIDEO inputs cover only the selected trim window.
  • Choose from content, adaptive, threshold, hash, and histogram detection methods.
  • Control the detection downscale factor while keeping representative images at their original resolution (unless max_width / max_height is set).
  • Keep PySceneDetect's default detector settings, or select custom to tune adaptive detection, content weights, and fade handling.

Requirements

Installation

Installing from ComfyUI Manager also installs the Python dependencies listed below. For a manual clone:

  1. Place this repository under the ComfyUI custom_nodes directory.

    • Example: ComfyUI/custom_nodes/Comfyui-SceneDetect
  2. Install the Python dependencies.

    pip install -r requirements.txt
    

    The requirements.txt file includes:

    • scenedetect-headless>=0.7.1,<0.8
    • opencv-python-headless>=4.9
    • numpy

    scenedetect-headless provides the same scenedetect Python module without GUI dependencies.

    PyTorch (torch) ships with the standard ComfyUI installation, so it is intentionally not listed here.

  3. Restart ComfyUI.

Node Name and Category

  • Node: PySceneDetect: Video → Scenes (recommended, built-in VIDEO input)
  • 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?

RecommendedLegacy
SceneDetect nodePySceneDetect: Video → ScenesPySceneDetect: Scenes → Images (Legacy VHS)
LoaderComfyUI built-in Load VideoVHS Load Video (Upload)
InputLazy VIDEOFull IMAGE batch + VHS_VIDEOINFO
Memory useOnly compressed video decoding and representative framesVHS must keep the full float32 frame batch in memory
Use caseNew workflows and long/high-resolution videosExisting VHS workflows

Inputs and Outputs

PySceneDetect: Video → Scenes

  • Required inputs
    • video (VIDEO): Connect the output from ComfyUI's built-in Load Video node. 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. hash compares perceptual hashes; histogram compares brightness distributions.
    • threshold (FLOAT): Detection threshold used by the content/threshold methods.
    • min_scene_len_sec (FLOAT): Minimum scene length in seconds. Values greater than zero override min_scene_len_frames.
    • min_scene_len_frames

Nós neste pacote

Nó 1
  • PySceneDetectVideo

Fontes

2 fontes
GitHubFonteVersão ae1adb4ff048f91d5f718ca321e589ef3f66ad6c
github.com/hndrr/Comfyui-SceneDetect

Verificado 10 de out.

GitHubFonte
github.com/hndrr/Comfyui-SceneDetect

Verificado 4 de nov.

Trechos de fonte

1 trecho

Source context: Repo hndrr/Comfyui-SceneDetect