MVNT Audio Segment
Your Song Is Too Long — Pick the 40 Seconds That Actually Dance
- audio
- audio
- segment_info
MVNT's dance engine is capped at 40 seconds of audio per generation. Feed it a three-minute track and it won't loop the whole thing or dance the middle - the choreography only ever covers the first 40 seconds unless you tell it otherwise. MVNT Audio Segment is the node that tells it otherwise. It's the front door of the whole pack: pick the slice of the track you actually want danced, and everything downstream (MVNT Generate Dance, the preview, the video render) works on that slice.
It's the node you reach for every single time, even with a short clip, because it's also where you set the start - and that one decision shapes the whole result. Dance one drop instead of another and you get a completely different performance.
How it works
This one never touches the network. It takes a ComfyUI AUDIO tensor, trims it locally with plain tensor slicing (torch, same thing ComfyUI itself uses under the hood), and returns a new AUDIO that's start_sec in and duration_sec long. The duration gets hard-clamped to the 40-second ceiling, and if your start_sec lands past the end of the file it backs off and grabs the last 40 seconds rather than returning silence. It's one of the rare nodes in this pack that runs entirely on your machine - no API key, no credits, no waiting.
The inputs that matter
Only two:
start_sec(FLOAT, default 0, max 3600) - where in the track the dance begins. This is the interesting knob. To reach the second half of a track, you set this.duration_sec(FLOAT, default 20, max 40) - how long the clip is. 20 seconds is a solid default; you can push to the 40 cap.
The audio input just takes your loaded track. Outputs are the trimmed audio (wire it into MVNT Generate Dance) and segment_info (STRING) - a JSON summary of total_sec, start_sec, end_sec, and duration_sec. It's there for your sanity and for debugging; you don't need to do anything with it.
Installing it
It's part of ComfyUI-MVNT, so installing the pack gets you this node. ComfyUI Manager → search MVNT → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mvnt-app/ComfyUI-MVNT.git comfyui-mvnt
cd comfyui-mvnt
pip install -r requirements.txt
Restart ComfyUI after. No model downloads - the pack's requirements.txt is just requests, numpy, soundfile, and Pillow, and this node needs even less than that. You don't need an MVNT API key for the trimming itself; you'll need it two nodes later at generation.
Gotchas
The 40-second clamp is the thing that bites people. If you set duration_sec to 60, you don't get an error - you get a 40-second clip and maybe confusion about why. Also remember the node trims but doesn't re-encode or normalize anything, so a quiet or loud segment stays that way; that's the audio you're handing to the choreography engine. If you've got an older install of the pack, clean out the legacy MVNT Dance Generate / MVNT Dance (All-in-One) nodes per the README so you don't end up with two competing node sets in your menu.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| start_sec | FLOAT | 0.00–3600 | — |
| duration_sec | FLOAT | 20.00.1–40 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| segment_info | STRING | — |