hifi-gan
Routes HiFi-GAN training, fine-tuning, waveform inference, and checkpoint/config troubleshooting.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- hifi-gan
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes HiFi-GAN training, fine-tuning, waveform inference, and checkpoint/config troubleshooting.
- disable-model-invocation
- true
02 资源文件 19
- 参考文档references/configuration.md2.8 KB
- 参考文档references/model-overview.md2.2 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json316 B
- 参考文档references/troubleshooting.md3.1 KB
- 脚本scripts/hifigan_runtime/__init__.py277 B
- 脚本scripts/hifigan_runtime/compat.py4.0 KB
- 脚本scripts/hifigan_runtime/configs/config_v1.json762 B
- 脚本scripts/hifigan_runtime/configs/config_v2.json762 B
- 脚本scripts/hifigan_runtime/configs/config_v3.json752 B
- 脚本scripts/hifigan_runtime/configs/requirements.txt113 B
- 脚本scripts/hifigan_runtime/env.py394 B
- 脚本scripts/hifigan_runtime/inference_e2e.py2.4 KB
- 脚本scripts/hifigan_runtime/inference.py2.6 KB
- 许可证scripts/hifigan_runtime/LICENSE1.0 KB
- 脚本scripts/hifigan_runtime/meldataset.py6.2 KB
- 脚本scripts/hifigan_runtime/models.py9.7 KB
- 脚本scripts/hifigan_runtime/train.py11.9 KB
- 脚本scripts/hifigan_runtime/utils.py1.3 KB
03 SKILL.md 正文
HiFi-GAN
HiFi-GAN is a speech vocoder repository with two user-facing workflows: training/fine-tuning from LJSpeech-style data and inference from trained generator checkpoints.
Use this skill for
- choosing between
config_v1.json,config_v2.json, andconfig_v3.json - training or fine-tuning HiFi-GAN with the repository's data layout
- wav-to-wav inference or mel-to-wav inference from generator checkpoints
- checkpoint/config pairing, output layout, and filename conventions
- CUDA, TensorBoard, librosa, mel-channel, and data-layout troubleshooting
- quick smoke checks with bundled helpers before expensive runs
- self-contained bundled runtime source/configs when the original checkout is not available
Do not use this skill for
- ASR, diarization, forced alignment, upstream text-to-mel generation, or other speech tasks that are not HiFi-GAN vocoder training/inference
- unrelated audio repos or generic deep-learning engines
Read first
references/model-overview.mdreferences/configuration.mdreferences/troubleshooting.mdreferences/repo-provenance.mdscripts/hifigan_runtime/for copied core source and bundled configssub-skills/training/SKILL.mdsub-skills/inference/SKILL.md
Route map
training— launch or resume training, fine-tuning, dataset/filelist preparation, checkpoint and TensorBoard behavior, and DDP/CUDA troubleshooting.inference— synthesize wavs from wav or mel inputs, pair checkpoints with configs, and handle output directories and smoke checks.
Shared facts
- The generator consumes 80 mel channels and emits one waveform channel.
- The bundled configs keep
num_mels = 80,sampling_rate = 22050, andhop_size = 256. - The runtime skill includes copied HiFi-GAN source under
scripts/hifigan_runtime/, includingtrain.py,inference.py,inference_e2e.py,models.py,meldataset.py,env.py,utils.py,LICENSE, and bundled V1/V2/V3 configs. - Use
sub-skills/training/scripts/train_hifigan.pyas the self-contained training/fine-tuning entrypoint. - Use
sub-skills/inference/scripts/infer_hifigan.pyas the self-contained wav/mel inference entrypoint. - Training writes
config.jsoninto the checkpoint directory and saves generator checkpoints asg_########. - Inference reads
config.jsonfrom the checkpoint directory and writes_generated.wavor_generated_e2e.wavfiles. - The bundled smoke helpers create tiny synthetic fixtures only; they are for wiring checks, not quality evaluation.
Safe setup
- Use a Python environment that can import
torch,librosa,scipy,tensorboard, andmatplotlib. - Prefer the sub-skill smoke helpers before long GPU runs or after dependency changes.
- Do not require an external source checkout for core HiFi-GAN code; the generated skill bundles the needed runtime source and configs.
- Keep the input directory clean: the bundled inference entrypoint ultimately
runs code that iterates
os.listdir(...)directly. - Keep training filelists basename-only in the first column; do not append
.wav.
Handoff pattern
- Start at this root skill to choose the right route.
- If the request is about training or fine-tuning, open
sub-skills/training/SKILL.md. - If the request is about generation, open
sub-skills/inference/SKILL.md. - If the request involves model/config details or failure analysis, read the
shared
references/files first.
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).