mmaudio
Route MMAudio video-to-audio, text-to-audio, data preparation, CUDA training, and evaluation workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- mmaudio
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route MMAudio video-to-audio, text-to-audio, data preparation, CUDA training, and evaluation workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/configuration.md4.8 KB
- 参考文档references/model-assets.md3.5 KB
- 参考文档references/repo-provenance.md2.6 KB
- 参考文档references/repo-routing-metadata.json504 B
- 参考文档references/troubleshooting.md4.9 KB
- 脚本scripts/check_mmaudio_env.py7.4 KB
03 SKILL.md 正文
MMAudio
Use this repo skill when a task involves MMAudio, the PyTorch project for synchronized audio generation from video and/or text. It is an operating guide for future agents: it distills the repository's install, model assets, CLI/API, training, data-preparation, and evaluation behavior without requiring the agent to reopen the original source tree for normal use.
First checks
- Confirm the task is about MMAudio-style audio generation, video-to-audio, text-to-audio, the MMAudio model variants, training feature memmaps, or the repo's batch-evaluation/onset tooling.
- Check whether the user needs a real model run. Real inference may download multi-GB model assets and is GPU/MPS-preferred; training/evaluation paths are CUDA/DDP-oriented.
- If a checkout or package install is present, run
scripts/check_mmaudio_env.pyfor a safe import/backend/config sanity check. It does not download weights or run a model. - Read
references/repo-provenance.mdbefore deciding whether this skill is stale for a newer checkout.
Route map
| User intent | Read this |
|---|---|
Generate audio for one prompt/video, build a demo.py command, use Gradio, or call mmaudio.eval_utils.generate |
sub-skills/inference/SKILL.md |
| Partition audio, validate captions/clip manifests, plan CLIP/Synchformer/VAE feature extraction, or inspect TensorDict memmap schemas | sub-skills/data-preparation/SKILL.md |
| Launch or debug DDP training, bounded smoke runs, checkpoint/weights resume, EMA synthesis, or Hydra training overrides | sub-skills/training/SKILL.md |
| Run batched generation for AudioCaps/VGGSound/MovieGen-style evaluation data or compute onset metrics | sub-skills/evaluation/SKILL.md |
Shared references
references/model-assets.mdlists MMAudio model variants, required checkpoint filenames, download/checksum behavior, sample rates, and license caveats.references/configuration.mdsummarizes shared Hydra conventions, sequence-length facts, default paths, and override style.references/troubleshooting.mdcovers cross-cutting install/import, CUDA, download, media, and dependency failures.references/repo-routing-metadata.jsonis structured metadata for managed repo-skill routing.
Installation and environment baseline
MMAudio is a Python package named mmaudio and requires Python 3.9+. The
repository documentation recommends a Miniforge/Conda-style environment on
Ubuntu. Install a CUDA-capable PyTorch stack first when GPU workflows are in
scope, then install the package in editable mode:
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade
python -m pip install -e <MMAudio checkout>
The package metadata declares dependencies such as torchcodec,
huggingface_hub, hydra-core, gradio, open_clip_torch, av, timm,
tensordict, librosa, torchdiffeq, and nitrous-ema. Training and the
built-in metric/sample path also depend on the external av_bench package from
the MMAudio authors' av-benchmark project.
Model families at a glance
| Variant | Mode | Typical use |
|---|---|---|
small_16k |
16 kHz | Lower sample rate, smaller network, training/evaluation examples. |
small_44k |
44.1 kHz | Smaller high-sample-rate generation. |
medium_44k |
44.1 kHz | Larger high-sample-rate model. |
large_44k |
44.1 kHz | Heavy high-sample-rate model. |
large_44k_v2 |
44.1 kHz | Recommended default for general inference. |
Every inference/evaluation variant needs a flow-prediction checkpoint, a VAE, and the Synchformer checkpoint; 16 kHz additionally uses the BigVGAN vocoder file. See the model-assets reference before downloading or debugging weights.
Boundaries and cautions
- This skill is for operating MMAudio, not for general audio ML, TTS, ASR, or unrelated diffusion models.
- Full generation, training, and batch evaluation can be expensive and may download large files. Use the bundled command builders and schema checks before launching CUDA work.
- Do not treat CPU import success as proof that CUDA training, feature extraction, or batch evaluation will work. Those code paths use CUDA/NCCL.
- The generated helper scripts print or validate commands by default; they do not modify model weights, launch servers, download checkpoints, or start training unless a user separately runs the printed project command.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).