Nodes/ComfyUI-JakeUpgrade/Scene Cuts JK๐Ÿ‰
ComfyUI Node

Scene Cuts JK๐Ÿ‰

Turn a timeline of cut points into frame-accurate scene segments

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Scene Cuts JK๐Ÿ‰
  • 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
โ—„fps16โ–บ
โ—„loop_frame_count81โ–บ
โ—„warmup_frame_count0โ–บ
โ—„overlap_frame_count10โ–บ
โ—„min_loop_frame_countfalseโ–บ
โ—„long_vid_methodfalseโ–บ
โ—„modetrueโ–บ
โ—„select_cutsโ–บ
โ—„segments3.0, 6.2 9.875โ–บ
โ—„compatibilityfalseโ–บ

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) - your segments values 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) - your segments values 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.

Category๐Ÿ‰ JK/๐Ÿฆ‰ Video

Inputs (11)

NameTypeDefaultDescription
fpsINT161โ€“120โ€”
loop_frame_countINT811โ€“1000โ€”
warmup_frame_countINT00โ€“100Only for WAN. Sometimes Wan Wapper needs several frames to warm up before normal output, especially for ref2v.
overlap_frame_countINT104โ€“100Overlap frames for Context Window or for-loop long-vid generation.
min_loop_frame_countBOOLEANfalseDeactivated.
long_vid_methodBOOLEANfalseOnly for WAN.
modeBOOLEANtrueโ€”
select_cutsSTRINGSelect specific cuts to output (e.g., '0' for first cut, '0-2' for cuts 0 to 2, '0,2,4' for specific cuts)
segmentsSTRING3.0, 6.2 9.875Enter the duration or cut points in 'second.millisecond' format, separated by commas or ' '(e.g., 3.0, 6.2, 9.875)
compatibilityBOOLEANfalseโ€”
audiooptAUDIOโ€”

Outputs (11)

NameTypeDescription
scene_countINTโ€”
scene_cutsSCENECUTSโ€”
select_cutsSTRINGโ€”
cut_frame_countsSTRINGโ€”
loop_frame_countsSTRINGโ€”
total_durationSTRINGโ€”
total_frame_countSTRINGโ€”
fpsFLOATโ€”
seg_frame_countINTโ€”
overlap_frame_countINTโ€”
long_vid_methodBOOLEANโ€”