APNext H3 Cut Plan (scenes from the music)
APNext H3 Cut Plan
- audio
- audio
- cut_plan
- count
- summary
Here's the thing about the APNext H3 Music Video Writer: when you hand it a song, it cuts the audio into scenes internally, and you never get to see where those cuts landed until the video is done. This node pulls that decision out of the black box. Feed it the song, tell it how long a scene may be, and it returns the whole scene list up front - how many scenes, and each one's start and end, placed where the music actually wants a cut. See it, edit it, then wire it into the writer.
It's a dagthomas/comfyui_dagthomas pack node, part of the same MiniMax-H3 video family as the Music Video Writer and H3 Sound Events. The killer property: once cut_plan is connected, the writer uses exactly these scenes - its own segment_mode, min_seconds and max_seconds widgets are ignored (and greyed out on the canvas).
How it works
It runs the same cutter the Music Video Writer uses internally, but exposed. It measures the song's structure and looks for the strongest reason to cut at each point: a section start (chorus in, verse in), a drop landing at the top of the new scene, a stop, a downbeat, a lyric phrase start - or, failing all of that, the strongest onset. Every boundary is snapped to the H3 frame grid, which moves in ~0.71 s steps, so a cut is never exactly on a hit; where it sits relative to the beat is what cut_placement controls.
The plan itself is plain text, one scene per line, so hand-editing it is a normal edit: change an end time, delete a line, and the writer follows. You can genuinely design the video before a single prompt exists.
The inputs that matter
Only three are required:
audio- the song, passed through so the node drops in between Load Audio and a writer.min_seconds/max_seconds- scene length bounds. H3 renders up to 15 s per clip, and below ~5 s a scene has no room for a move and its landing, hence the 5.2 s default minimum.
Then the optional stuff earns its keep:
segment_mode- Auto (cut on the music), Fixed (every scene as long as allowed), or Lyric lines (cut just before a lyric phrase when one is in reach, needs timed lyrics).manual_cuts- seconds orm:ssseparated by spaces, e.g. from 🎮 Tap the cuts. Each gets snapped to the nearest onset within 150 ms and becomes a scene boundary.lyrics- timed lyrics ([0:15] line) so cuts don't land just after a line has started.sound_events- feed in theeventsoutput of an APNext H3 Sound Events node and a drop lands at the top of a new scene, a stop closes one.cut_placement- Auto, Before the beat (the hit opens the new scene - the classic music-video cut), or After the beat (the hit closes the outgoing scene).
Outputs: audio (passthrough), cut_plan (wire into the writer), count, and summary.
Install
Same pack install as everything else in this family:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Then restart ComfyUI. (ComfyUI Manager → "comfyui_dagthomas" works too.) No models, no heavy dependencies for this node - the audio analysis is pure torch, and it's fast.
Troubleshooting
Two things trip people up. First: if cut_plan is connected and you're still tweaking the writer's min/max widgets expecting them to do something - they won't, by design; edit the plan text instead. Second: the frame grid means a "cut on the downbeat" isn't frame-exact, which is fine for cutting but shows up if you also run a sync check later. And remember the plan is only as smart as the audio you give it - wire sound_events from H3 Sound Events if you want the drop/stop reasoning, since this node's own analysis is a lighter pass.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | The song. Passed through so the node drops in between Load Audio and a writer. | |
| segment_mode | COMBO | Auto (cut on the music) | Auto cuts on the music (section starts, drops, stops, downbeats, onsets). Fixed makes every scene as long as allowed. Lyric lines cuts just before a lyric phrase whenever one is in reach (needs timed lyrics below). |
| max_seconds | FLOAT | 15.03–15 | Longest scene allowed. H3 renders up to 15 s per clip. |
| min_seconds | FLOAT | 5.23–15 | Shortest scene allowed. Below ~5 s a scene has no room for a move and its landing. |
| manual_cutsopt | STRING | Cuts you placed yourself - seconds or m:ss separated by spaces - e.g. from 🎮 Tap the cuts. Each one is snapped to the nearest onset within 150 ms and becomes a scene boundary; stretches between your cuts longer than max_seconds are cut on the music as usual. | |
| lyricsopt | STRING | Optional timed lyrics (`[0:15] line`). Cuts then avoid landing just after a line has started, and the Lyric lines mode cuts right before lines. | |
| sound_eventsopt | STRING | Optional: the `events` output of an APNext H3 Sound Events node. A drop then lands at the top of a new scene and a stop closes one. | |
| cut_placementopt | COMBO | Auto (nearest onset; drops open the new scene) | Which side of a beat the cut sits on. The frame grid moves a cut in 0.71 s steps, so a cut is never exactly on a hit. Before: the cut lands just ahead of the hit and the hit is the first thing in the new scene (the classic music-video cut; drops, downbeats and onsets all open the new scene, tapped cuts round down onto the grid). After: the hit is the last thing in the outgoing scene and the new one opens on the release (tapped cuts round up). Auto: the cutter's usual mix - onsets and downbeats from either side, drops opening the new scene. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| cut_plan | STRING | — |
| count | INT | — |
| summary | STRING | — |