技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
training【数据与研究】Routes HiFi-GAN training, fine-tuning, dataset layout, checkpointing, validation, and distributed GPU training workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user needs to train or fine-tune HiFi-GAN with the skill's self-contained bundled train_hifigan.py entrypoint, choose a V1/V2/V3 config, prepare LJSpeech-style filelists, manage checkpoints/logs, or debug CUDA/distributed training failures.
scripts/train_hifigan.py for full training with v1, v2, v3, or a custom JSON config.LJSpeech-1.1/wavs, LJSpeech-1.1/training.txt, and LJSpeech-1.1/validation.txt style inputs..npy files in ft_dataset or a custom --input_mels_dir.--checkpoint_path.torch.multiprocessing/NCCL training.../../scripts/hifigan_runtime/.inference sub-skill..npy mel files. Use the sibling inference sub-skill.../../references/ when available.references/training-workflows.md — training/fine-tuning commands, checkpoint/log behavior, validation, and distributed notes.references/config-and-data.md — V1/V2/V3 config differences, LJSpeech filelist schema, mel .npy layout, and environment facts.references/troubleshooting.md — concrete recovery guidance for missing wavs, sample-rate mismatches, fine-tuning mel errors, CUDA, TensorBoard, checkpoint collisions, and DDP mistakes.../../references/ — model/config internals and provenance shared with other HiFi-GAN sub-skills.scripts/train_hifigan.py — self-contained training/fine-tuning entrypoint that runs bundled HiFi-GAN source and resolves --config v1|v2|v3 to bundled configs.scripts/make_ljspeech_fixture.py — creates a tiny LJSpeech-style wav/filelist fixture, optionally with mel .npy files or intentionally bad rows for negative tests.scripts/smoke_train_tiny.py — creates a temporary fixture and tiny config, then runs a short GPU training pass through scripts/train_hifigan.py with safe compatibility shims for modern PyTorch/librosa stacks.From this sub-skill's scripts/ directory or by using the script path from anywhere with a CUDA-capable PyTorch environment:
python scripts/train_hifigan.py --config v1
python scripts/train_hifigan.py --config v2 --checkpoint_path cp_hifigan_v2
python scripts/train_hifigan.py --config v3 --checkpoint_path cp_hifigan_v3
For fine-tuning, provide basename-matched mel files and pass the flag exactly as a truthy value:
python scripts/train_hifigan.py --fine_tuning True --config v1 --input_mels_dir ft_dataset
For a cheap local sanity check before a real run:
python scripts/smoke_train_tiny.py --dry-run
python scripts/smoke_train_tiny.py
The inspection run verified that torch 2.3.1+cu121 imports on an NVIDIA A100-SXM4-40GB host, CUDA is available, torch.cuda.get_device_name(0) works, torch.utils.tensorboard imports, and librosa.util.normalize is present in librosa 0.10.2.post1. The repository requirements are older; read references/troubleshooting.md before assuming modern library compatibility.
inference.py / inference_e2e.py, route to inference instead.../../references/ only for model/config background.