Nodes/MiniMax H3 Audio T8/MiniMax H3 Audio Window (T8)
ComfyUI Node

MiniMax H3 Audio Window (T8)

Trim your source audio to exactly the grid H3 wants

By T8mars·Created 20 days ago·Updated a day ago· 807
MiniMax H3 Audio Window (T8)
  • audio
  • context_audio
  • length
  • final_trim_start_seconds
  • final_duration_seconds
  • prompt_timing_note
  • report_json
scene_start_seconds0.00
scene_duration_seconds5.00
warmup_seconds0.00
cooldown_seconds0.00
ensure_minimum_contexttrue

H3 is fussy about its grids. Video runs at 24fps on the 17n+5 frame lattice, and the audio clock rides along on a 40Hz cadence - so if you feed it a source track sliced at some arbitrary second boundary, you get a latent that doesn't line up, and your "keep the original sound" workflow quietly loses sync. MiniMaxH3AudioWindowT8 exists to stop that being your problem: it slices (or pads) a source AUDIO to an H3-aligned context and hands you back the exact trim metadata so the rest of your chain knows precisely what it's working with.

Think of it as the audio twin of a duration planner. You tell it where the scene starts, how long it is, and how much warm-up or cool-down context you want around it, and it returns a context_audio that's been cut to fit the model's expectations - plus a prompt_timing_note that tells you how to phrase the timing in your prompt.

The inputs

  • scene_start_seconds (0) - where in the source the scene begins.
  • scene_duration_seconds (5) - how much of it you actually want. This is what gets snapped to the H3 grid, so 5.0 seconds may come back as a slightly different final_duration_seconds.
  • warmup_seconds / cooldown_seconds (0) - extra context on either side that gets trimmed out of the final deliverable. Useful when the model needs to hear a beat before the action to keep the sound natural.
  • ensure_minimum_context (true) - if the requested slice is too short for H3's minimum context, pad instead of erroring. Leave it on unless you have a reason not to.

The outputs - where the value is

context_audio is the thing you feed downstream. But the metadata outputs are the real payload: length (the frame count that matches your audio window), final_trim_start_seconds and final_duration_seconds (the exact slice after snapping), and prompt_timing_note (a string describing the timing for your prompt). Wire those into a trim node after decode and your final file comes out at exactly the window you asked for, not the window H3 approximated.

This pairs naturally with MiniMaxH3AudioConditioningT8: window the audio first, feed context_audio as your drive_audio, and let the Conditioning node's own length snapping agree with what the window already did. Two nodes doing the same grid math twice is how you end up with 3-frame offsets that are invisible in the UI and audible in the render.

Install

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8

Restart ComfyUI. It's in T8/MiniMax H3/Audio, needs no dependencies and no models - pure signal slicing on the AUDIO tensor. It's the audio half of the 02-audio-control example workflows, which are the fastest way to see the warm-up/cooldown pattern in action on real material. And if your source is a long file with several shots, chain a few of these with different scene_start_seconds - that's the Long Video segmentation pattern the pack builds on.

CategoryT8/MiniMax H3/Audio

Inputs (6)

NameTypeDefaultDescription
audioAUDIO
scene_start_secondsFLOAT0.000–86400
scene_duration_secondsFLOAT5.000.04–900
warmup_secondsFLOAT0.000–60
cooldown_secondsFLOAT0.000–60
ensure_minimum_contextBOOLEANtrue

Outputs (6)

NameTypeDescription
context_audioAUDIO
lengthINT
final_trim_start_secondsFLOAT
final_duration_secondsFLOAT
prompt_timing_noteSTRING
report_jsonSTRING