Nodes/ComfyUI-BETA-Cropnodes/Scene detect & split πŸŽ₯ πŸ…‘πŸ…”πŸ…£πŸ…
ComfyUI Node

Scene detect & split πŸŽ₯ πŸ…‘πŸ…”πŸ…£πŸ…

Split your video into scenes inside ComfyUI, no DaVinci required

By Burgstall-labsΒ·Created about a year agoΒ·Updated 6 months agoΒ· 8
Scene detect & split πŸŽ₯ πŸ…‘πŸ…”πŸ…£πŸ…
  • images
  • scene_1
  • scene_2
  • scene_3
  • scene_4
  • scene_5
  • remaining_frames
  • scene_frames
  • scene_summary
  • scene_count
β—„threshold27.0β–Ί

Scene detect & split takes a batch of video frames that are already sitting in your graph and cuts it into separate scenes for you. No ffmpeg, no external tool, no leaving ComfyUI. If you've ever manually scrubbed through a video to find where the shot changes so you can treat each scene differently - per-scene prompts, per-scene img2img, a keyframe from each cut - this is the node that stops you doing that by hand. It's the kind of thing people normally offload to DaVinci Resolve or a PySceneDetect script; this packs it onto a wire.

The node is part of Burgstall-labs' helper pack (the "Burgstall Enabling The Awesomeness" suite, hence the πŸ…‘πŸ…”πŸ…£πŸ… branding), a small MIT-licensed grab bag of video and text utilities. Nothing to download beyond the pack itself - no model files.

How it works

Under the hood it's PySceneDetect, the standard Python scene-detection library, driven by its ContentDetector. The trick is that PySceneDetect normally wants a video file, so the node writes your image batch out to a temporary mp4 with OpenCV, runs the detector, reads the scene boundaries back, and slices your original tensor at those frame numbers. There's a temp file write/read roundtrip on every run, so don't expect zero-cost - but for a few hundred frames it's effectively instant.

ContentDetector scores how much consecutive frames differ; a big jump means a scene change. That's exactly what threshold tunes.

The inputs that matter

Honestly, there's only one you'll touch:

  • images - the frame batch. Feed it whatever you already decoded, e.g. the frames output from a video loader or a generated video's VAE-decode.
  • threshold (default 27) - sensitivity. The author's tooltip says it straight: lower values (15–20) detect more scene changes, higher values (30–40) fewer. Start at the default and move up, not down - see the gotchas.

What you get out

  • scene_1 through scene_5 - the first five detected scenes as separate image batches, each containing all the frames of that scene. If the video has only two cuts, scene_3–scene_5 come back empty. Wire each into whatever you process per-scene.
  • remaining_frames - everything after scene 5. This is the chain output: feed it into a second Scene detect & split node to grab scenes 6–10, then repeat. That's how you handle long videos.
  • scene_frames - a small preview batch of the start/end frame of each scene, handy for a quick visual check.
  • scene_summary - a string with total frames, scenes detected vs. output, and the exact frame ranges. Read it in a preview node; it tells you if you're over-segmenting.
  • scene_count - total scenes detected in the whole batch, not capped at five. If this is much larger than the five you got, you know chaining is needed.

Install

ComfyUI Manager is easiest - search "BETA-Helpernodes" (or "Burgstall") and install. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Burgstall-labs/ComfyUI-BETA-Helpernodes.git

Then restart ComfyUI. The pack ships a requirements.txt that includes scenedetect[opencv] and opencv-python, and Manager normally installs it; if you cloned by hand, run pip install -r requirements.txt in your ComfyUI environment. Worth knowing: this pack was previously named ComfyUI-BETA-Cropnodes and some registry metadata still references the old folder, so if you had that old install, delete it and reinstall under the new name.

Gotchas

The big one is over-segmentation. PySceneDetect's ContentDetector is twitchy - there's a standing complaint in the community that its default segmentation is so fine-grained it "destroys the consistency of the video" when you split on every detected cut. Camera pans, cuts between similar-looking shots, and compression noise all score as changes. If your scene_count looks absurd, raise threshold toward 35–40 before you blame the node.

The other classic: the node exists on the menu but silently doesn't load. The pack wraps its imports in try/except, so if scenedetect is missing, the rest of the pack loads fine and this node just never registers. Check your console for a "[BETA Helper Nodes] Failed to import" line - that means the dependency didn't install.

CategoryBurgstall Enabling The Awesomeness

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEβ€”
thresholdFLOAT27.00–100Detection sensitivity threshold. Lower values (e.g., 15-20) detect more scene changes (more sensitive). Higher values (e.g., 30-40) detect fewer scene changes (less sensitive). Default: 27.0

Outputs (9)

NameTypeDescription
scene_1IMAGEβ€”
scene_2IMAGEβ€”
scene_3IMAGEβ€”
scene_4IMAGEβ€”
scene_5IMAGEβ€”
remaining_framesIMAGEβ€”
scene_framesIMAGEβ€”
scene_summarySTRINGβ€”
scene_countINTβ€”