MMAudio Sampler
The node that turns a silent video into a soundtrack
- mmaudio_model
- feature_utils
- images
- audio
This is the node you actually came for. The ModelLoader and FeatureUtilsLoader are setup; the MMAudio Sampler is the payoff - give it your video frames, a prompt, and it returns audio that fits the motion. This is the final stage of a "silent render to finished clip" pipeline, the thing people bolt onto the end of Wan or Hunyuan work (the KB's audio doc tracks it as the workhorse for exactly this job, all the way back to the Gradio-era days).
How it works
MMAudio is a flow-matching model, so "sampling" here means interpolating from noise to audio latents along a learned trajectory. The node preprocesses your frames into two streams: a CLIP stream (resized to 384px, sampled at 8fps, for "what's happening") and a Synchformer stream (224px, 25fps, for "how things move"). Then it runs euler flow-matching for the requested number of steps with a CFG strength applied between the prompt and negative prompt. The result comes out as an AUDIO tensor at 44.1kHz.
The inputs that matter
Most of the defaults are sensible, so here's the short list you'll actually touch:
- prompt - steers the sound ("rain on a window, distant thunder"). This works on its own: leave
imagesempty and it's text-to-audio for sound effects. Note that "text-only mode to save VRAM" isn't really a thing - the FeatureUtilsLoader still loads the full encoder stack. - images (optional) - an
IMAGEbatch of video frames, typically from a VHS-style video node or your video generation output. Without it you get pure text-to-audio; with it, the video drives the sound. - duration (seconds, default 8) - how long the audio is. If your video is shorter than the requested duration, the node truncates rather than resamples - that's a known quirk (there are open issues about it), so ask for the duration you want and make sure the video covers it.
- steps (default 25) and cfg (default 4.5) - standard diffusion dials. 25 euler steps is a solid starting point; lower steps get rough, higher gets slower. CFG around 4.5 is the sweet spot for MMAudio.
- seed - change it to get a different take on the same prompt.
Two flags worth knowing. mask_away_clip (default off) strips the semantic CLIP stream and keeps only the motion stream - useful when you want sound that follows the movement but doesn't describe the content. force_offload (default on) pushes the model back to the offload device after sampling and frees VRAM for the rest of your workflow - leave it on; audio isn't the expensive part of a video pipeline anyway.
The output
One audio socket (type AUDIO). Wire it into ComfyUI's native PreviewAudio to hear it, or into a video node's audio input (like VHS_VideoCombine) to marry it to your clip. That's the whole loop: silent render → MMAudio Sampler → finished video with sound.
Where people get burned
The two real failure modes are both in the setup, not here. First, if the loader nodes above haven't finished or have wrong files, the Sampler fails before it ever samples - check the ModelLoader/FeatureUtilsLoader first. Second, the duration mismatch: people set 8 seconds, feed a 5-second clip, and get audio that's shorter than expected, because the node truncates the frame count to what exists. Match duration to your actual footage and it's smooth. On the VRAM side, this pack is comfortably lighter than the video models it usually follows - on a 24GB card you can leave the video workflow resident and still sample audio.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| mmaudio_model | MMAUDIO_MODEL | — | |
| feature_utils | MMAUDIO_FEATUREUTILS | — | |
| duration | FLOAT | 8.00 | Duration of the audio in seconds |
| steps | INT | 25 | Number of steps to interpolate |
| cfg | FLOAT | 4.5 | Strength of the conditioning |
| seed | INT | 00–18446744073709550000 | — |
| prompt | STRING | — | |
| negative_prompt | STRING | — | |
| mask_away_clip | BOOLEAN | false | If true, the clip video will be masked away |
| force_offload | BOOLEAN | true | If true, the model will be offloaded to the offload device |
| imagesopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |