training-and-checkpoints
Operate TurboDiffusion rCM/SLA training setup, dry-run command construction, checkpoint conversion, model merge, quantized export, and data/checkpoint layout validation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-and-checkpoints
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate TurboDiffusion rCM/SLA training setup, dry-run command construction, checkpoint conversion, model merge, quantized export, and data/checkpoint layout validation.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/checkpoint-workflows.md7.6 KB
- 参考文档references/cli-reference.md7.9 KB
- 参考文档references/training-and-data.md6.9 KB
- 参考文档references/troubleshooting.md8.2 KB
- 脚本scripts/build_modify_model_command.py6.1 KB
- 脚本scripts/build_safetensors_to_pth_command.py4.6 KB
- 脚本scripts/build_training_dryrun_command.py7.4 KB
- 脚本scripts/tiny_merge_models_check.py6.0 KB
03 SKILL.md 正文
TurboDiffusion Training And Checkpoints
Use this sub-skill when the task is about TurboDiffusion rCM/SLA training setup, debug-only training command construction, Distributed Checkpoint (DCP) versus PyTorch .pth formats, merging SLA/rCM updates, converting sharded safetensors, or exporting modified/quantized Wan checkpoints.
Do not run full training or model conversion by default. Full training, dataset synthesis, checkpoint quantization, and inference-format conversion are GPU/model/data heavy and remain skip-expensive unless the user explicitly authorizes them and provides checkpoints, data, credentials policy, and backend readiness.
Route first
- Use references/training-and-data.md for rCM/SLA training prerequisites, debug/dry-run planning, data shard layout, checkpoint roots, and WANDB/environment decisions.
- Use references/checkpoint-workflows.md for DCP-to-
.pth,.pth-to-DCP, merge arithmetic, safetensors conversion, andmodify_modelexport semantics. - Use references/cli-reference.md for safe command templates and supported flags for public training/checkpoint utilities.
- Use references/troubleshooting.md when a user reports DCP/PTH confusion, missing roots/shards, training extras, WANDB issues, mismatched model names, or quantization/SLA failures.
Bundled safe helpers
These helpers only build commands or run a tiny CPU tensor arithmetic check; they do not download, train, execute model inference, or require the original checkout.
- scripts/build_training_dryrun_command.py: render a
torchrun ... -m scripts.train --dryruncommand with explicit config/checkpoint/data overrides. - scripts/build_modify_model_command.py: render a
modify_model.pycheckpoint export/quantization command for Wan2.1/Wan2.2 model profiles. - scripts/build_safetensors_to_pth_command.py: render a sharded safetensors-to-
.pthcommand with optional key prefixing. - scripts/tiny_merge_models_check.py: create temporary tiny tensors and verify the source merge formula
base + w * (diff_target - diff_base)on CPU.
Operating rules
- Start with layout validation: checkpoint root, teacher DCP, VAE, text encoder, negative embedding, output root, and WebDataset shard pattern.
- For training requests, prefer a dry-run/config-composition command first. Explain that actual training needs CUDA/multi-GPU readiness, training extras, model/data files, and a WANDB/offline logging decision.
- For DCP conversion, distinguish direction:
.pthteacher checkpoint must be converted to DCP before FSDP training; saved training DCP directories can later be converted back to.pth. - For model merge, warn that mismatched shapes/keys are not fatal in the source utility but require manual key-coverage inspection before treating the output as good.
- For quantized export, ensure the source checkpoint is already in the expected rCM/SLA state-dict shape, choose a valid Wan model name, and align
--quant_linearwith later inference/serving commands. - For source-layout use, mention the public package quirk: top-level imports such as
rcm,imaginaire,SLA,ops,scripts, andmodify_modeloften require settingPYTHONPATHto the package source directory.
Cross-skill routing
- Route full T2V/I2V use of converted checkpoints to the
video-inferencesub-skill. - Route interactive serving with converted checkpoints to the
interactive-servingsub-skill. - Route CUDA extension build, INT8/FastNorm op failures, plain SLA versus SageSLA backend decisions, or SpargeAttn installation issues to the
acceleration-backendssub-skill.
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).