inference
Operate MMAudio inference for text-to-audio, video-to-audio, experimental image-to-audio, the CLI demo, the Gradio UI, and programmatic generation.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- inference
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate MMAudio inference for text-to-audio, video-to-audio, experimental image-to-audio, the CLI demo, the Gradio UI, and programmatic generation.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md6.9 KB
- 参考文档references/cli-reference.md5.2 KB
- 参考文档references/gradio-interface.md3.0 KB
- 参考文档references/troubleshooting.md3.9 KB
- 脚本scripts/build_demo_command.py6.7 KB
03 SKILL.md 正文
MMAudio Inference
Use this sub-skill when the task is to run, package, or diagnose MMAudio inference only. It covers pretrained model selection, CLI demo usage, Gradio launch behavior, and programmatic generation wiring.
What this sub-skill covers
demo.pyfor command-line text-to-audio and video-to-audio generation.gradio_demo.pyfor the browser UI, including the experimental image-to-audio tab.mmaudio.eval_utils.generate,load_video,load_image, andmake_videofor custom callers.mmaudio.model.networks.get_my_mmaudioandMMAudio.update_seq_lengthsfor duration-aware inference.- Safe command construction for
demo.pywithout executing the model.
Route elsewhere
- Training, checkpointing, and DDP setup -> training sub-skill.
- Dataset or feature preparation -> data-preparation sub-skill.
- Batch evaluation or onset metrics -> evaluation sub-skill.
Operating rules
- Default to
large_44k_v2unless a smaller model or 16 kHz output is explicitly needed. - For any duration change, update both
seq_cfg.durationandnet.update_seq_lengths(...)before generation. - For video jobs, trust the duration returned by
load_video(...); it truncates to the usable clip and sync coverage. - Use
--skip_video_compositewhen the user only needs audio or when video reconstruction is unnecessary. - High-resolution inputs slow decode/encode work without improving quality; trim or re-encode instead of upscaling.
- The Gradio script downloads and loads the model at import time, then exposes only its output directory for browser access.
Start here
references/cli-reference.mdreferences/api-reference.mdreferences/gradio-interface.mdreferences/troubleshooting.mdscripts/build_demo_command.py
Notes
- This subtree is self-contained runtime guidance. Do not send future agents back to the original repository docs.
- Evidence labels used to build this sub-skill: README.md, docs/MODELS.md, demo.py, gradio_demo.py, mmaudio/eval_utils.py, mmaudio/model/networks.py, mmaudio/model/sequence_config.py, mmaudio/utils/download_utils.py.
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).