data-preparation
Convert raw videos into the training-ready, face-aligned, AV-synced, quality-filtered LatentSync data tree.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-preparation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Convert raw videos into the training-ready, face-aligned, AV-synced, quality-filtered LatentSync data tree.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/data-formats.md7.7 KB
- 参考文档references/troubleshooting.md8.9 KB
- 参考文档references/workflows.md10.0 KB
- 脚本scripts/check_data_prep_inputs.py17.8 KB
- 脚本scripts/run_data_pipeline.py22.1 KB
03 SKILL.md 正文
data-preparation
Use this sub-skill when a task needs LatentSync's raw-video preprocessing path: validating prerequisites, planning a run, executing safe stages, recovering from interrupted preprocessing, or explaining why a data-prep gate rejected clips.
Route here for
- Raw
.mp4tree cleanup, FPS/audio resampling, scene splitting, and 5-second segment generation. - Face alignment and resizing for training-ready talking-head clips.
- AV sync confidence filtering, audio offset correction, and visual-quality filtering.
- Optional resolution and post-affine face-presence gates for noisy corpora.
- Preflight checks for inputs, codecs, auxiliary checkpoints, CUDA visibility, Python imports, and scratch directories.
Entry points
scripts/check_data_prep_inputs.py— safe preflight checker that does not mutate data or run the heavy pipeline.scripts/run_data_pipeline.py— parameterized planner/runner adapted from the repo'sdata_processing_pipeline.shandpreprocess/data_processing_pipeline.py.references/workflows.md— stage order, multiprocessing model, GPU requirements, checkpoints, and rerun strategy.references/data-formats.md— raw input shape, intermediate sibling directories, finalhigh_visual_quality/layout, and scratch semantics.references/troubleshooting.md— codec, checkpoint, face-detection, GPU, worker-pool, and temp-dir failures.
Source surfaces distilled
- Pipeline orchestration:
preprocess/data_processing_pipeline.py,data_processing_pipeline.sh. - CPU stages:
preprocess/remove_broken_videos.py,preprocess/resample_fps_hz.py,preprocess/detect_shot.py,preprocess/segment_videos.py. - Optional gates:
preprocess/filter_high_resolution.py,preprocess/remove_incorrect_affined.py. - GPU stages:
preprocess/affine_transform.py,preprocess/sync_av.py,preprocess/filter_visual_quality.py. - Pipeline internals:
latentsync/utils/affine_transform.py,latentsync/utils/av_reader.py,latentsync/utils/image_processor.py,latentsync/utils/face_detector.py,latentsync/utils/util.py,eval/syncnet_detect.py,eval/hyper_iqa.py,eval/syncnet/syncnet.py,eval/syncnet/syncnet_eval.py,configs/syncnet/*.yaml,docs/syncnet_arch.md.
Boundaries
Do not use this sub-skill for training launches, model checkpoint selection for U-Net/SyncNet training, single-pair inference, Gradio/Cog serving, or evaluation metrics that are not data-prep gates. Treat tools/download_web_videos.py as reference-only and do not run it from bundled helpers because it is network-bound and shells out to external downloaders.
Operating rule
Run the preflight checker before any real data-prep run. Missing auxiliary checkpoints or CUDA should be surfaced as explicit prerequisites before worker pools start. The first pipeline stage deletes broken raw videos in place, so run the full executor only on a disposable copy of the raw tree or after consciously passing the destructive-input flag.
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).