inference
Run LatentSync single-pair, small-batch, Gradio, and deployment-aware inference workflows safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- inference
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Run LatentSync single-pair, small-batch, Gradio, and deployment-aware inference workflows safely.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/api-reference.md7.7 KB
- 参考文档references/deployment.md2.4 KB
- 参考文档references/troubleshooting.md5.3 KB
- 参考文档references/workflows.md6.6 KB
- 脚本scripts/launch_gradio.py5.3 KB
- 脚本scripts/run_inference.py16.2 KB
03 SKILL.md 正文
Inference
Use this sub-skill when you need LatentSync to synthesize lip-synced video from an input video and an input audio file, or when you need to launch the local demo UI.
Do not use this sub-skill for training, raw preprocessing pipeline stages, or SyncNet/FVD scoring.
What this sub-skill owns
- Single-pair generation through the repo-maintained
scripts.inferencemodule. - A safer replacement for the demo shell command with explicit repository root, config, checkpoint, input, output, temp, seed, and DeepCache controls.
- Small-batch generation for file-list or pair-list inputs when outputs are only being produced.
- Gradio demo launch with explicit
shareand browser behavior instead of implicit public sharing. - Reference-only notes for Cog/Replicate deployment entry points.
Route here when the request is about
- Running the demo assets or a user-supplied video/audio pair.
- Choosing between the 256 and 512 U-Net inference configs.
- Enabling or disabling DeepCache during generation.
- Launching, smoke-checking, or adapting the Gradio app.
- Understanding Cog/Replicate inference behavior before adapting it elsewhere.
Do not route here when the request is about
- Selecting training stages, launching U-Net/SyncNet training, or editing train configs. Use the training sub-skill when available.
- Processing raw datasets into face-aligned training clips. Use the data-preparation sub-skill.
- Scoring generated outputs with SyncNet confidence, SyncNet accuracy, or FVD. Use
../evaluation/SKILL.mdwhen outputs are being evaluated. - Downloading remote weights or running network-only deployment helpers as local inference.
Start here
- Read
references/workflows.mdfor single-pair, batch, and UI launch flows. - Read
references/api-reference.mdfor prompt-safe CLI, function, pipeline, and config notes. - Read
references/troubleshooting.mdbefore long GPU runs or when a preflight check fails. - Use
scripts/run_inference.pyfor CLI and small-batch generation. - Use
scripts/launch_gradio.pyfor local UI launch or Gradio import smoke tests. - Read
references/deployment.mdonly when adapting Cog/Replicate behavior.
Runtime rules
- Always pass
--repo-rootto helper scripts so imports, configs, checkpoints, masks, and assets resolve from the intended LatentSync runtime tree. - Prefer
configs/unet/stage2_512.yamlfor the released v1.6 checkpoint andconfigs/unet/stage2.yamlfor a v1.5 or 256-resolution checkpoint. - Treat missing
checkpoints/latentsync_unet.pt, missing Whisper weights, missingffmpeg, and unavailable CUDA as preflight blockers. - Keep temp directories isolated; the underlying pipeline deletes and recreates its
temp_dir. - Use the evaluation sub-skill only after batch outputs need scores.
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).