开源项目解析
LatentSync
字节开源的口型同步:音频直接驱动潜空间扩散,不经过中间的运动表示。
让画面里的人对上口型
读懂层
2 张 · 架构图 / 流程图
DeepWiki 架构页 · 抓取 2026-08-16 · 核验 2026-08-16
DeepWiki 架构页 · 抓取 2026-08-16 · 核验 2026-08-16
人脸用 InsightFace 检测 → 仿射变换 → 缩到 256×256(1.6 版 512×512);音频重采样到 16kHz,视频 25 FPS。SyncNet 是照这条流水线训的。
它管哪几个决定
声音后期配音:改词不重出视频
7/10 家有官方说法自持能力
权重在不在本地可下载到本地
种子能不能填不涉及
换掉它要动几处一处
末端环节,接上或摘掉不影响前面
动手层
文档代码结构 未做踩过的坑实测 未做
装它要过哪几关
- 1source setup_env.sh仓库给了环境脚本,别自己拼
- 2权重放 ./checkpoints/`latentsync_unet.pt` 与 `whisper/tiny.pt` 两个
- 3选版本1.5 要 8GB、1.6 要 18GB —— 先看卡再选版本,不是越新越好
改哪个文件能改什么
分辨率1.5 是 256×256,1.6 是 512×512。这决定了显存也决定了成片精度输入规格视频 25 FPS、音频 16kHz —— 不合规先转,别指望它兼容坑在哪一处
带 issue 编号的来自:github issues 按回复数排序 · 核验 2026-08-16
版本与显存1.5→1.6 显存从 8GB 跳到 18GB。这不是小版本升级,是换一档硬件
数据预处理官方明说 SyncNet 是照它自家流水线(仿射变换 + 音视频对齐)训的,未经同样处理的数据评估不准 —— 拿它的指标衡量别处的产出会得到错的结论
素材要求人脸要能被 InsightFace 检出。侧脸、小脸、遮挡都会直接卡住
教程
没找到官方口径的教程 —— 官方只给了 README。
项目自述
以下是仓库 README 的开头部分(原文引用,抓取 2026-08-17)。读全文 ↗
LatentSync
🔥 Updates
- 2025/06/11: We released LatentSync 1.6, which is trained on 512 $\times$ 512 resolution videos to mitigate the blurriness problem. Watch the demo here.
- 2025/03/14: We released LatentSync 1.5, which (1) improves temporal consistency via adding temporal layer, (2) improves performance on Chinese videos and (3) reduces the VRAM requirement of the stage2 training to 20 GB through a series of optimizations. Learn more details here.
📖 Introduction
We present *LatentSync*, an end-to-end lip-sync method based on audio-conditioned latent diffusion models without any intermediate motion representation, diverging from previous diffusion-based lip-sync methods based on pixel-space diffusion or two-stage generation. Our framework can leverage the powerful capabilities of Stable Diffusion to directly model complex audio-visual correlations.
🏗️ Framework
LatentSync uses the Whisper to convert melspectrogram into audio embeddings, which are then integrated into the U-Net via cross-attention layers. The reference and masked frames are channel-wise concatenated with noised latents as the input of U-Net. In the training process, we use a one-step method to get estimated clean latents from predicted noises, which are then decoded to obtain the estimated clean frames. The TREPA, LPIPS and SyncNet losses are added in the pixel space.
🎬 Demo
Original video
Lip-synced video
(Photorealistic videos are filmed by contracted models, and anime videos are from VASA-1)
📑 Open-source Plan
- [x] Inference code and checkpoints
- [x] Data processing pipeline
- [x] Training code
🔧 Setting up the Environment
Install the required packages and download the checkpoints via:
bash
source setup_env.sh
If the download is successful, the checkpoints should appear as follows:
./checkpoints/
|-- latentsync_unet.pt
|-- whisper
| -- tiny.pt
Or you can download latentsync_unet.pt and tiny.pt manually from our HuggingFace repo
🚀 Inference
Minimum VRAM for inference:
- 8 GB with LatentSync 1.5
- 18 GB with LatentSync 1.6
There are two ways to perform inference:
1. Gradio App
Run the Gradio app for inference:
bash
python gradio_app.py
2. Command Line Interface
Run the script for inference:
bash
./inference.sh
You can try adjusting the following inference parameters to achieve better results:
- inference_steps [20-50]: A higher value improves visual quality but slows down the generation speed.
- guidance_scale [1.0-3.0]: A higher value improves lip-sync accuracy but may cause the video distortion or jitter.
🔄 Data Processing Pipeline
The complete data processing pipeline includes the following steps:
1. Remove the broken video files.
2. Resample the video FPS to 25, and resample the audio to 16000 Hz.
3. Scene detect via PySceneDetect.
4. Split each video into 5-10 second segments.
5. Affine transform the faces according to the landmarks detected by InsightFace, then resize to 256 $\times$ 256.
6. Remove videos with sync confidence score lower than 3, and adjust the audio-visual offset to 0.
7. Calculate hyperIQA score, and remove videos with scores lower than 40.
Run the script to execute the data processing pi
……(后略,见原文)判断
优势
- 1.5 版只要 8GB,消费级显卡跑得动
- Apache-2.0,商用没有灰色地带
- 字节出品,★6.0k,是这一格最成熟的开源实现
局限
- 1.6 版要 18GB —— 想要 512×512 就得换卡,两个版本不是「新的更好」这么简单
- 停更 14 个月(最后提交 2025-06-20)
- SyncNet 是照它自家流水线训的,未经同样处理的数据评估不准
不适用
人脸很小或频繁遮挡的素材 —— 检测不到脸就无从下手。
同管这些决定的其它项目
MiniMax H3全模态生成:文字、图片、视频、音频进同一个 Transformer,出带 32kHz…ACE-Step音乐生成基座:文生音乐、歌词编辑、音色复刻、remix。…pyvideotrans识别 → 翻译 → 合成 → 回封装的整条流水线,做跨语言配音与字幕。…IndexTTS2B 站开源的零样本语音合成:给一段参考音就能克隆音色,情感可以单独指定。中英双语。…Ollama一条命令在本机跑开源大模型。写脚本、翻译这两段靠它才不出本机。…DiffSynth-Studio魔搭扩散模型工程框架,覆盖图像、视频、音乐推理与训练;近期加入 FLUX.3、MOS…MoneyPrinterTurbo给个主题或关键词,一键出高清短视频,含字幕与配音。…NarratoAI用大模型一键解说并剪辑现成视频。…VOZEB PRO把统一创作 Agent、画布、短剧生产线、素材库和商业运营后台放进同一套 Next.…OpenMontage让 Agent 编排视频生产:通过声明式流水线组织素材、生成、字幕、音频与合成。…乘风视频剪辑 Skills用 Claude Code Skills 做的视频剪辑 Agent。中文侧最成型的一…OpenChatCut对话式视频剪辑器,本地优先。你说「第二条音轨第 8 秒加个故障转场」,它就去改那一刀…video-podcast-maker给编码 Agent 用的 skill:给一个主题,出一条 4K 带解说的讲解片。11…ComfyUI 官方工作流模板ComfyUI 内置的那批官方工作流模板与子图蓝图的真身仓库。…ClipForge带货短视频专用的一站式工具:上传商品图,自动提炼卖点、写种草脚本、配音配字幕加背景乐…短视频工厂跨平台桌面应用:给提示词文本加分镜素材,自动剪出产品营销或泛内容短视频。集成文案生成…Open AI UGC生成 UGC 风格的口播广告:用多个视频模型出真人感的 AI 演员念你的脚本。定位是…LiveTalking实时交互流式数字人引擎,音视频同步对话。支持 ernerf、musetalk、wav…Drama Skills面向编剧与漫剧工作室的短剧创作流水线:十个技能把一个点子或一部长篇材料,一路做成分集…PromptLensAI 视频提示词分析工具:丢进一条别人的视频,反推出它的提示词与创作脚本,并做画面分…
github README · 核验 2026-10-19 | 判断栏可报错。