AGENT SKILL

training

Configure and launch LatentSync U-Net and SyncNet training with safe config, file-list, DDP, checkpoint, and VRAM guidance.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
training
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Configure and launch LatentSync U-Net and SyncNet training with safe config, file-list, DDP, checkpoint, and VRAM guidance.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

training

Route LatentSync training work through this sub-skill when the task involves choosing or adapting U-Net or SyncNet training configs, generating dataset file lists, rendering distributed launch commands, or diagnosing training-time config/checkpoint/VRAM failures.

What this covers

  • U-Net stage selection for stage1, stage1_512, stage2, stage2_512, and stage2_efficient configurations.
  • SyncNet training selection for pixel, pixel-with-attention, and latent-space variants.
  • Safe torchrun command rendering for scripts.train_unet and scripts.train_syncnet without executing long training unless explicitly requested.
  • Dataset fileslist creation and preflight checks for training-ready .mp4 clips.
  • Checkpoint, DDP/NCCL, config-path, malformed-fileslist, and VRAM troubleshooting.

Primary entry points

  • scripts/run_training.py — render or explicitly execute a safe torchrun command for U-Net or SyncNet training; run it after editing a config copy and use --preflight to validate data/file-list paths.
  • scripts/write_fileslist.py — recursively write deterministic training fileslists from one or more processed dataset roots.
  • references/workflows.md — U-Net and SyncNet training flow, dataset/file-list preparation, command patterns, and post-training validation notes.
  • references/configuration.md — config anatomy and how the U-Net and SyncNet variants differ.
  • references/troubleshooting.md — failure-mode matrix for checkpoints, DDP, fileslists, VRAM, and config mismatches.

Included source surfaces

  • scripts/train_unet.py and train_unet.sh, adapted through scripts/run_training.py.
  • scripts/train_syncnet.py and train_syncnet.sh, adapted through scripts/run_training.py.
  • tools/write_fileslist.py, adapted as scripts/write_fileslist.py.
  • configs/unet/*.yaml, configs/syncnet/*.yaml, configs/audio.yaml, and configs/scheduler_config.json, distilled in the bundled references and launcher metadata.
  • docs/syncnet_arch.md, distilled in references/configuration.md.
  • latentsync/data/*_dataset.py, latentsync/models/*.py, latentsync/trepa/loss.py, latentsync/utils/util.py, and latentsync/whisper/audio2feature.py, used to explain runtime requirements and failure modes.

Explicitly excluded

  • Raw preprocessing pipeline internals; use the data-preparation sub-skill for those stages.
  • Inference UI/CLI operation; use the inference sub-skill after a checkpoint exists.
  • Full metric/evaluation workflows; this sub-skill only notes the training scripts' built-in validation artifacts.

Operational summary

  • Run training from a LatentSync checkout because the repo has no packaging metadata; the bundled scripts accept --repo-root to make that explicit.
  • Use torchrun, not direct python -m, because both training entry points initialize distributed state from torchrun-provided environment variables.
  • Prefer the bundled launcher in dry-run mode first, then use --execute only after paths, fileslists, checkpoints, CUDA devices, and VRAM budget are verified.
  • Treat stage2_512.yaml as a high-VRAM production configuration, not as a casual smoke target.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351