Element Load and Edit Video
The 'scene detection' node that's secretly a video editor
- info
The class name says ElementSceneDetection, but in the node menu this is Element Load and Edit Video - and that's the whole story in miniature. The author built a visual, single-track video editor that happens to do scene detection on import, then kept the old class name out of laziness while the README openly admits the old name stopped fitting. So if you googled "ComfyUI scene detection," you landed on a node that will happily do the cutting for you and then hand you a timeline to finish the job by hand.
What it's actually for
Video-to-video and reference-video generation. Local video models like MiniMax H3, Wan, and Hunyuan want clean source footage - but the clip you want is usually buried inside a longer recording with cuts, dead air, and shots you don't need. Normally that means leaving ComfyUI for a separate NLE, exporting trimmed pieces, and importing them back. This node collapses all of that into the graph: you import once, auto-split at shot boundaries, trim and reorder clips on a visual timeline, and pass the edited result downstream as segments.
It's worth knowing who built this, because it explains the design. The pack it ships in (ComfyUI_Element_easy) is stuffed with MiniMax H3 helpers - a latent upscaler, sigma tweaks, even bundled ref2va workflows for H3 reference-to-video. The author is clearly doing real H3 ref-video work and got tired of cutting footage elsewhere. The README's claim that this "can replace the Load Video node in most cases" holds up: it loads the file and then some.
How it works
Three layers. The frontend is a timeline widget (import, Auto Split, manual cut marking, drag-to-reorder, trim edges). When you import, the video is copied to ComfyUI/input/element_scene_detection/, so it persists with your setup rather than living in the graph JSON. Auto Split runs PySceneDetect's ContentDetector over the file; the threshold (5–50, lower = finer cuts) decides how aggressive it is. Your manual edits, stored as JSON state, always take priority - if you've touched the timeline, execution won't silently re-split over you.
On execute the node checks the video still exists, probes its resolution from the header only (no full decode), works out the segment ranges from your cuts or manual edits, and emits one output: an info bundle. That's a custom ESD_INFO type - effectively JSON carrying the video path, frame count, source fps, resolution, your force_rate/subsampling, and the segment ranges. It contains no pixels; it's a map that tells the downstream nodes where to dig.
The inputs you'll actually touch
Just two, because clips_data is hidden UI state.
- force_rate - force the output fps.
0means "keep the source rate," which is what you want 99% of the time. Set it only when you need a uniform rate across mixed-source clips. - subsampling - keep every Nth frame, like VHS's
select_every_nth.1keeps everything. Dropping to 2 halves your frame count and your memory bill downstream.
The output and where it goes
The info output wires straight into Element Video Clip, which does the actual frame-and-audio decoding for whichever segment you pick. Add Element Video Info after that for the numbers. That's the whole trio, and this node is the front door.
Installing it
Easiest: ComfyUI Manager, search ComfyUI_Element_easy, install, restart. Manual works too:
cd ComfyUI/custom_nodes
git clone https://github.com/supElement/ComfyUI_Element_easy.git
cd ComfyUI_Element_easy
pip install -r requirements.txt
The video code genuinely needs PyAV, OpenCV, and scenedetect - all in requirements.txt, so the pip step matters. System ffmpeg is optional: without it everything works, only audio playback and audio-included export degrade (export falls back to a silent mp4). And a warning: the video trio is written against ComfyUI's newer comfy_api.io node API, so keep ComfyUI reasonably current. If it's ancient, the pack logs 场景检测节点未加载 ("scene detection node failed to load") and the node simply won't appear.
What bites people
- "No usable video source" on run means the imported file got moved or deleted. Uploaded videos live in
input/element_scene_detection/, not inside your workflow JSON - so a workflow you downloaded from someone else never carries their video with it. Re-import. - The node auto-runs scene detection on execution only if you've left the timeline alone. Make manual edits and it respects them.
- Don't confuse the class name (
ElementSceneDetection) with the menu name. In ComfyUI search, type "Element Load and Edit Video" or just "Element."
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| force_rate | INT | 00–240 | Force output fps. 0 = keep source fps (see video_info line for the real rate). |
| subsampling | INT | 11–100 | Keep every Nth frame (like VHS select_every_nth). 1 = keep all. |
| clips_data | STRING | {} | Internal UI state (hidden) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| info | ESD_INFO | — |