Scene Detect
Cut Detection That Skips the NLE
- video
- images
- clips
If you've ever hand-cut a montage from raw footage, you know the pain this node removes. Scene Detect scans a video, finds every hard cut, and hands you two usable things: the keyframes and the cut clips. It's the auto-editor's opening move - the "watch 40 minutes of B-roll and mark the shots" chore - reduced to one stage under ComfyTV/Video, and it's a genuinely good advertisement for why people are building video pipelines inside ComfyUI in the first place.
The engine is straightforward content-difference detection: it compares consecutive frames and flags jumps above a threshold as cuts. Where it gets useful is the parameters you can use to steer it:
threshold(0.05–1, default 0.4) - how big a frame difference counts as a cut. Lower it and you catch fades and flash cuts; raise it and you skip the soft transitions.min_gap_s(0–30, default 1) - the minimum gap between detected cuts, in seconds. This is your de-noiser: set it to skip the rapid-fire jump cuts in an action sequence if you only want real scene changes.output-frames(default, a grid of keyframe images) orclips(actually cut video segments).cut_mode-fast(default) orprecise. Precise does exact-frame trimming on the cut segments; fast is, well, fast.
Both outputs fire: images (a COMFYTV_IMAGES batch of keyframes - the first frame plus one per detected cut) and clips (a COMFYTV_VIDEO - the footage split at each cut, ready for a Sequence stage to reassemble with transitions).
The workflow shape
The classic flow: run Scene Detect on your source → pick keyframes in the images grid (the selected_index field is the internal 1-indexed pick, driven by clicking a thumbnail) → feed the good shots into a Sequence/Compose stage. It pairs especially well with ComfyTV's Director console for shot-by-shot assembly. It's not magic - a dissolve isn't a cut, and with min_gap_s at 0 you'll get a dozen false positives from camera flashes - but as a first pass it's dramatically faster than scrubbing.
Install
Ships with ComfyTV:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI and it's under ComfyTV → Video; or search "ComfyTV" in ComfyUI Manager. Desktop/macOS: clone into the running instance's absolute custom_nodes path (from the startup log) and do a full backend restart - and check for a nested ComfyTV/ComfyTV/ folder after cloning. Pure torch/numpy/ffmpeg work, no extra dependencies, no model files.
Troubleshooting
- "Scene Detect: no cuts found - lower the threshold and try again." The node's own error and the fix is in the message. Slow pans and talking heads genuinely may produce no detected cut at 0.4; try 0.2.
- Clips come out too long or short.
cut_modecontrols trim precision - switch topreciseif your edits feel sloppy. - Fake cuts everywhere. Raise
min_gap_s; flashes and quick camera moves get merged into the surrounding shot instead of spawning clips.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| threshold | FLOAT | 0.400.05–1 | — |
| min_gap_s | FLOAT | 1.00–30 | — |
| output | COMBO | frames | 2 options: frames, clips |
| cut_mode | COMBO | fast | 2 options: fast, precise |
| selected_index | INT | 11–999 | Internal — 1-indexed cell pick for image-batch stages. Driven by clicking a thumbnail in the node's output grid. |
| videoopt | COMFYTV_VIDEO | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | COMFYTV_IMAGES | — |
| clips | COMFYTV_VIDEO | — |