Scene Cuts JK๐
Turn a timeline of cut points into frame-accurate scene segments
- audio
- scene_count
- scene_cuts
- select_cuts
- cut_frame_counts
- loop_frame_counts
- total_duration
- total_frame_count
- fps
- seg_frame_count
- overlap_frame_count
- long_vid_method
This is the node behind the pack's "Cuts" series of video workflows - the ones that generate multiple videos, one per scene in your edit, instead of one long generation that drifts off-model halfway through. Scene Cuts JK takes a list of cut times or per-scene durations and turns it into frame-accurate scene segments that downstream samplers can loop over. You give it a timeline; it gives you the per-scene frame math.
The two modes (the mode toggle)
mode = True(duration mode, default) - yoursegmentsvalues are durations: "3.0, 6.2, 9.875" means scene one is 3 seconds, scene two is 6.2, scene three is 9.875. It chains them end to end.mode = False(cut-point mode) - yoursegmentsvalues are absolute cut points on the timeline: where each scene ends.
Either way, segments accepts comma- or newline-separated values in second.millisecond format. And there's an optional audio input: feed it an AUDIO tensor and the node reads its actual duration, clamping the total to the audio length - which is how the "video based on scene & audio cuts" workflows stay in sync with the soundtrack.
The frame-count knobs
- fps (default 16) - frames per second for the conversion.
- loop_frame_count (default 81) - the per-scene generation length the sampler will use.
- overlap_frame_count (default 10) - the overlap between consecutive long-video segments, so cuts blend instead of jumping.
- warmup_frame_count (default 0) - Wan-only. Some Wan Wrapper models need a few warmup frames before output is usable, especially ref2v; this subtracts them.
- compatibility - toggles frame-count rounding between Wan-style (multiple of 4 + 1) and LTXV2-style (multiple of 8 + 1). This is the knob that makes the same node drive both model families.
- long_vid_method - Wan-only; switches to the for-loop long-video stitching strategy.
- min_loop_frame_count - deactivated in v2.1.8; leave it alone.
- select_cuts - filter which cuts come out (e.g.
0,0-2,0,2,4). Handy when you only want to regenerate scene three.
The outputs
The one you actually feed downstream is scene_cuts - a structured dict {cuts: [[start, end], ...], count, warmup} that the video module's cut-driven nodes consume. Alongside it you get a bunch of readable summaries: scene_count, cut_frame_counts, loop_frame_counts, total_duration and total_frame_count (each showing both the scene timeline and the actual generated frames), select_cuts, fps, and echoes of seg_frame_count, overlap_frame_count, and long_vid_method. Preview those string outputs while tuning and they tell you exactly what the graph will generate.
Why the "Cuts" approach wins
Long video generation fails because 500+ frames of a single diffusion run drifts - color shifts, identity changes, coherence collapse. Cutting the video into scenes and generating each one (with overlap and consistent stitching) keeps every segment on-model. It's the same philosophy as the pack's long-video workflows: chunk it, then sew it. This node is the seamstress's ruler.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
pip install -r requirements.txt
It reads audio duration straight from the AUDIO tensor, so no extra audio deps. The most common setup error is feeding duration-mode values into cut-point mode (or vice versa) and getting weird scene counts - if scene_count looks wrong, flip the mode toggle before touching your timings.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| fps | INT | 161โ120 | โ |
| loop_frame_count | INT | 811โ1000 | โ |
| warmup_frame_count | INT | 00โ100 | Only for WAN. Sometimes Wan Wapper needs several frames to warm up before normal output, especially for ref2v. |
| overlap_frame_count | INT | 104โ100 | Overlap frames for Context Window or for-loop long-vid generation. |
| min_loop_frame_count | BOOLEAN | false | Deactivated. |
| long_vid_method | BOOLEAN | false | Only for WAN. |
| mode | BOOLEAN | true | โ |
| select_cuts | STRING | Select specific cuts to output (e.g., '0' for first cut, '0-2' for cuts 0 to 2, '0,2,4' for specific cuts) | |
| segments | STRING | 3.0, 6.2 9.875 | Enter the duration or cut points in 'second.millisecond' format, separated by commas or ' '(e.g., 3.0, 6.2, 9.875) |
| compatibility | BOOLEAN | false | โ |
| audioopt | AUDIO | โ |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| scene_count | INT | โ |
| scene_cuts | SCENECUTS | โ |
| select_cuts | STRING | โ |
| cut_frame_counts | STRING | โ |
| loop_frame_counts | STRING | โ |
| total_duration | STRING | โ |
| total_frame_count | STRING | โ |
| fps | FLOAT | โ |
| seg_frame_count | INT | โ |
| overlap_frame_count | INT | โ |
| long_vid_method | BOOLEAN | โ |