audio-diffusion-pytorch
Use audio-diffusion-pytorch for PyTorch waveform diffusion generators, text-conditioned audio generation, inpainting, upsampling, vocoding, and diffusion autoencoding.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- audio-diffusion-pytorch
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use audio-diffusion-pytorch for PyTorch waveform diffusion generators, text-conditioned audio generation, inpainting, upsampling, vocoding, and diffusion autoencoding.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md1.7 KB
- 参考文档references/repo-routing-metadata.json443 B
- 参考文档references/troubleshooting.md4.1 KB
- 脚本scripts/check_install.py4.2 KB
03 SKILL.md 正文
audio-diffusion-pytorch
Use this repo skill when a task involves the audio-diffusion-pytorch package or asks for PyTorch audio diffusion model setup, waveform generation, diffusion upsampling, mel vocoding, inpainting, or audio autoencoding.
This package provides building blocks and wrappers; it does not ship pretrained weights, ready-to-run checkpoints, or guaranteed Moûsai paper configs. Treat examples as model-construction and shape recipes unless the user supplies weights, data, or a training plan.
Install and quick checks
Install the public package:
pip install audio-diffusion-pytorch
Minimal import check:
python - <<'PY'
from importlib.metadata import version
import audio_diffusion_pytorch
print(version("audio-diffusion-pytorch"))
print("import ok")
PY
Optional dependencies:
- Text conditioning uses the default
a-unetT5 embedder and requirestransformers. First use may consult Hugging Face cache or network. - README-style autoencoder examples may use
audio_encoders_pytorchandauraloss, but the coreDiffusionAEwrapper can also work with a local encoder object. - CUDA is optional for this package. CPU is enough for tiny smoke checks; use a CUDA-capable PyTorch install only when the user wants GPU execution.
Run scripts/check_install.py to report installed versions, optional modules, and public signatures. Use --check-cuda only when you want a tiny CUDA allocation.
Route map
- Use
sub-skills/generation/SKILL.mdforDiffusionModel,UNetV0,VDiffusion,VSampler, text-conditioned generation,VInpainter, schedules, distributions, and expertDiffusionARnotes. - Use
sub-skills/conditioning/SKILL.mdforDiffusionUpsampler,DiffusionVocoder,DiffusionAE,EncoderBase,AdapterBase, mel spectrogram conditioning, and transform plugins. - Use
references/troubleshooting.mdfor install/import issues, optional dependencies, backend questions, no-pretrained-weights expectations, and cross-cutting shape gotchas. - Use
references/repo-provenance.mdbefore deciding whether this skill is current for a checkout or should be refreshed.
Common decisions
- Identify the workflow family first:
- new waveform generation, text prompts, sampler errors, or masks →
generation; - lower-rate waveform conditioning, mel spectrograms, latents, encoders, adapters, or custom losses →
conditioning.
- new waveform generation, text prompts, sampler errors, or masks →
- Keep smoke tests tiny: use channel counts and lengths from the bundled scripts before scaling to README-sized tensors.
- Set
resnet_groups=1for tiny channels, or use channel widths divisible by the defaultresnet_groups=8. - Keep tensors on one device. Move the model and all inputs to CUDA only after CPU shape checks pass.
- Do not promise audio quality from random weights. Sampling APIs validate shape and execution, not trained generation quality.
Avoid this skill when
- The user wants a pretrained audio diffusion checkpoint, dataset download, or benchmark reproduction and has not supplied the missing assets.
- The task is about non-PyTorch audio libraries, ASR/TTS pipelines unrelated to diffusion/vocoding, or image diffusion.
- The user is editing this repository's release workflow rather than using the package APIs.
Maintenance note
This skill is self-contained for operating use. If a future checkout changes package metadata, public constructors, README workflows, or source roots, run refresh-repo-skill instead of patching this skill ad hoc.
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).