MiniMax H3 Finite Audio Tail Trim (Internal)
Eight latent ticks of audio, handled for you
- audio
- Trimmed Audio
Tiny node, one very specific job, and it exists because audio continuation across video segments is genuinely fiddly.
Here's the situation it fixes. When you carry audio forward between segments, the pack uses what it calls Soft AV: the carried overlap stays exact until its final eight audio-latent ticks, where a half-cosine releases it into newly generated sound. That release is real content, and for it to survive into your final file, the incoming segment has to own the seam. Meaning: before concatenating, someone has to cut the matching interval off the end of the audio you've accumulated so far. That's this node. Its docstring - "gives an incoming Soft AV segment seam ownership" - is exactly it.
How it works
It takes an AUDIO dict and an overlap in frames, snaps the overlap to H3's legal temporal grid, converts frames to samples at the incoming waveform's own sample rate (trim_frames / 24 * sample_rate), and slices that many samples off the tail. Note the direction: tail, not head. The accompanying head-trim logic lives in Finite Segment Finalize and is switched off for generated audio, precisely so this node can work from the other end.
It's careful in the two ways that matter for a utility this small. It validates that the audio actually contains a waveform and a positive sample rate, so you get a sentence rather than a TypeError deep in a tensor op. And it refuses to trim the whole thing: if the waveform is shorter than the trim, it raises "Accumulated audio is too short to replace its overlap tail" instead of handing you an empty waveform that fails somewhere further downstream with a shape error.
The aligned overlap is the same value used for the latent carry and the frame trim. Ask for 48 frames, the pack aligns to 39, and 39 is what gets converted to samples here. If you're reasoning about the math by hand and it isn't quite working out, that snapping is almost always why.
Inputs and outputs
Two inputs, both required:
audio- an AUDIO dict withwaveformandsample_rate. In the shipped graphs this is the carried stream inside the merge step, so you're not usually the one supplying it.overlap_frames- default 39, which is a telling default. In the frame domain 39 is the aligned form of a ~2-second overlap at H3's 24 fps, i.e. the main-chain overlap rather than the per-segment one. Range 1–3592.
One output: Trimmed Audio, a new AUDIO dict with the tail removed. The input dict is copied rather than mutated, so it's safe to fan the original out to more than one consumer.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Songssx/ComfyUI-MiniMaxH3-TimelineDirector.git
Restart, search MiniMax H3 to confirm the pack loaded. Empty dependency list - nothing to pip install; the pack uses PyTorch/torchaudio and the rest of a standard ComfyUI environment. As an (Internal) node it stays out of the add-node menu unless dev mode is on. You need native MiniMax H3 nodes, the H3 Ref2VA model, CLIP, video VAE and audio VAE, and Python 3.10+.
Common issues
"Accumulated audio is too short to replace its overlap tail." The accumulated stream is shorter than the overlap interval - usually the very first concatenation, where "accumulated" is a single short segment. Either the segment is too short for the overlap you set, or you've accidentally routed a per-segment stream here instead of the merged one.
"audio must contain waveform and a valid sample_rate." You passed something that isn't a ComfyUI AUDIO dict - commonly a waveform tensor or a raw sample-rate int. Both fields have to travel together.
The join gets quieter, or a syllable drops. You're running with locked original audio and this node still trimmed. With a fixed soundtrack the pack trims the incoming head instead, so Soft AV tail trimming shouldn't be in the path at all. Check the plan's audio policy: this is one of the few places where the locked-audio mode changes which nodes run, not just their settings.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| overlap_frames | INT | 391–3592 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Trimmed Audio | AUDIO | — |