Nodes/ComfyUI-JakeUpgrade/Cut Audio Index JK๐Ÿ‰
ComfyUI Node

Cut Audio Index JK๐Ÿ‰

Cut Audio Index JK

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Cut Audio Index JK๐Ÿ‰
  • audio
  • scene_cuts
  • audio
โ—„index0โ–บ

If you're building a "cuts" workflow - the Wan video generation pattern where each scene becomes its own generated clip - you don't want to type cut times by hand. You want a single index that selects segment number N, so a loop can generate every segment automatically. Cut Audio Index JK is that node: it takes your audio, a SCENECUTS object from the pack's Scene Cuts JK, and an index, then slices out exactly that one cut.

The mechanism is straightforward and it's worth knowing because it explains the index limits. Scene Cuts JK produces a SCENECUTS dict holding a list of (start, end) times. This node does scene_cuts["cuts"][index], converts those seconds to sample offsets, and cuts the waveform. Two details matter:

  • Negative indices count from the end. The minimum is -1, so index = -1 grabs the last cut. If you're looping a list of cuts, negative values are a neat way to handle "the tail" without knowing the count. Out-of-range indices raise a clear error instead of silently clamping.
  • Negative start times get silence-padded. If a cut begins before 0.0 (which happens when warmup or negative offsets are involved), the node prepends silence to keep the segment length consistent - same trick as Cut Audio JK's mute flags.

There are no knobs beyond audio, scene_cuts, and index - this node is deliberately dumb, which is the point. All the math (warmup frames, WAN-vs-LTXV2 frame compatibility, overlap for context windows) happens upstream in Scene Cuts JK. Downstream, you pair Cut Audio Index with the matching video segment generator, so audio and video stay in lockstep.

Install. It ships in ComfyUI-JakeUpgrade:

cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt

Or ComfyUI Manager โ†’ search "JakeUpgrade". Windows portable: install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt, then restart. No model downloads.

Gotchas: this node does nothing without SCENECUTS, and that type only exists if the pack's video module loads - if you trimmed your module list in config.ini, cut them both back in. The usual JakeUpgrade traps apply: LOAD_DEPRECATED_NODES = True if a JK node comes up missing from a shared workflow, and disable ComfyUI MultiGPU per the README if you see CUDA errors. And the classic beginner stumble: index is zero-based, so "the first cut" is 0 - the tooltip and the -1 trick make this easier to get wrong than you'd think.

Category๐Ÿ‰ JK/๐ŸŽป Audio

Inputs (3)

NameTypeDefaultDescription
audioAUDIOโ€”
scene_cutsSCENECUTSโ€”
indexINT0-1โ€“100โ€”

Outputs (1)

NameTypeDescription
audioAUDIOโ€”