ONNX 模型库
返回模型

说明文档

<div align="center">

<h1 align="center" style="font-weight: 900; font-size: 80px; color: #FF6B6B; margin-bottom: 20px;"> PersonaLive! </h1>

<h2>面向直播的生动人像图像动画</h2>

<a href='https://arxiv.org/abs/2512.11253'><img src='https://img.shields.io/badge/ArXiv-2512.11253-red'></a> <a href='https://huggingface.co/huaichang/PersonaLive'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-ffc107'></a> <a href='https://modelscope.cn/models/huaichang/PersonaLive'><img src='https://img.shields.io/badge/ModelScope-Model-624AFF'></a> GitHub

Zhiyuan Li<sup>1,2,3</sup> · Chi-Man Pun<sup>1,📪</sup> · Chen Fang<sup>2</sup> · Jue Wang<sup>2</sup> · Xiaodong Cun<sup>3,📪</sup>

<sup>1</sup> 澳门大学    <sup>2</sup> Dzine.ai    <sup>3</sup> GVC Lab, 大湾区大学

<h3 align="center" style="color: #ff4d4d; font-weight: 900; margin-top: 0;"> ⚡️ 实时、可流式传输、无限长度 ⚡️ <br> ⚡️ 人像动画仅需 ~12GB 显存 ⚡️ </h3>

<table width="100%" align="center" style="border: none;"> <tr> <td width="46.5%" align="center" style="border: none;"> <img src="assets/demo_3.gif" style="width: 100%;"> </td> <td width="41%" align="center" style="border: none;"> <img src="assets/demo_2.gif" style="width: 100%;"> </td> </tr> </table>

</div>

📋 待办事项

  • [ ] 如果您觉得 PersonaLive 有用或有趣,请在我们的 GitHub 仓库 上给我们一个 Star 🌟!您的支持激励我们不断改进。🍻
  • [ ] 修复 Bug(如果您遇到任何问题,请随时提出 issue 或联系我!🙏)
  • [ ] 增强 WebUI(支持参考图像替换
  • [x] [2025.12.22] 🔥 支持离线推理中的流式策略,可在 12GB 显存上生成长视频!
  • [x] [2025.12.17] 🔥 ComfyUI-PersonaLive 现已支持!(感谢 @okdalto
  • [x] [2025.12.15] 🔥 发布 论文
  • [x] [2025.12.12] 🔥 发布 推理代码配置预训练权重

⚙️ 框架

<img src="assets/overview.png" alt="Image 1" width="100%">

我们提出了 PersonaLive,一个实时可流式传输的扩散框架,能够在单张 12GB GPU 上生成无限长度的人像动画。

🚀 快速开始

🛠 安装

# 克隆本仓库
git clone https://github.com/GVCLab/PersonaLive
cd PersonaLive

# 创建 conda 环境
conda create -n personalive python=3.10
conda activate personalive

# 使用 pip 安装依赖包
pip install -r requirements_base.txt

⏬ 下载权重

方式 1:自动下载基础模型和其他组件的预训练权重(sd-image-variations-diffuserssd-vae-ft-mse)。您可以运行以下命令自动下载权重:

python tools/download_weights.py

方式 2:从以下任一 URL 下载预训练权重到 ./pretrained_weights 文件夹:

<a href='https://drive.google.com/drive/folders/1GOhDBKIeowkMpBnKhGB8jgEhJt_--vbT?usp=drive_link'><img src='https://img.shields.io/badge/Google%20Drive-5B8DEF?style=for-the-badge&logo=googledrive&logoColor=white'></a> <a href='https://pan.baidu.com/s/1DCv4NvUy_z7Gj2xCGqRMkQ?pwd=gj64'><img src='https://img.shields.io/badge/Baidu%20Netdisk-3E4A89?style=for-the-badge&logo=baidu&logoColor=white'></a> <a href='https://modelscope.cn/models/huaichang/PersonaLive'><img src='https://img.shields.io/badge/ModelScope-624AFF?style=for-the-badge&logo=alibabacloud&logoColor=white'></a> <a href='https://huggingface.co/huaichang/PersonaLive'><img src='https://img.shields.io/badge/HuggingFace-E67E22?style=for-the-badge&logo=huggingface&logoColor=white'></a>

最终,这些权重应按如下方式组织:

pretrained_weights
├── onnx
│   ├── unet_opt
│   │   ├── unet_opt.onnx
│   │   └── unet_opt.onnx.data
│   └── unet
├── personalive
│   ├── denoising_unet.pth
│   ├── motion_encoder.pth
│   ├── motion_extractor.pth
│   ├── pose_guider.pth
│   ├── reference_unet.pth
│   └── temporal_module.pth
├── sd-vae-ft-mse
│   ├── diffusion_pytorch_model.bin
│   └── config.json
├── sd-image-variations-diffusers
│   ├── image_encoder
│   │   ├── pytorch_model.bin
│   │   └── config.json
│   ├── unet
│   │   ├── diffusion_pytorch_model.bin
│   │   └── config.json
│   └── model_index.json
└── tensorrt
    └── unet_work.engine

🎞️ 离线推理

python inference_offline.py

⚠️ RTX 50 系列(Blackwell)用户注意:xformers 尚未完全兼容新架构。为避免崩溃,请通过以下命令禁用它:

python inference_offline.py --use_xformers False

📸 在线推理

📦 设置 Web UI

# 安装 Node.js 18+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 18

cd webcam
source start.sh

🏎️ 加速(可选)

将模型转换为 TensorRT 可以显著加速推理(约 2 倍 ⚡️)。构建引擎可能需要约 20 分钟,具体取决于您的设备。请注意,TensorRT 优化可能会导致轻微的变化或输出质量的轻微下降。

pip install -r requirements_trt.txt

python torch2trt.py

提供的 TensorRT 模型来自 H100。我们建议所有用户(包括 H100 用户)在本地重新运行 python torch2trt.py 以确保最佳兼容性。

▶️ 开始推流

python inference_online.py --acceleration none(适用于 RTX 50 系列)或 xformers 或 tensorrt

然后在浏览器中打开 http://0.0.0.0:7860。(*如果 http://0.0.0.0:7860 不能正常工作,请尝试 http://localhost:7860

使用方法:上传图像 ➡️ 融合参考 ➡️ 开始动画 ➡️ 享受!🎉 <div align="center"> <img src="assets/guide.png" alt="PersonaLive" width="60%"> </div>

关于延迟:延迟因您设备的计算能力而异。您可以尝试以下方法进行优化:

  1. 在 WebUI 中降低"Driving FPS"设置以减少计算负载。
  2. 您可以增加倍数(例如设置为 num_frames_needed * 4 或更高)以更好地匹配您设备的推理速度。https://github.com/GVCLab/PersonaLive/blob/6953d1a8b409f360a3ee1d7325093622b29f1e22/webcam/util.py#L73

📚 社区贡献

特别感谢社区提供的有用设置!🥂

  • Windows + RTX 50 系列指南:感谢 @dknos 提供了关于在 Windows 上使用 Blackwell GPU 运行本项目的详细指南

  • Windows 上的 TensorRT:如果您尝试在 Windows 上转换 TensorRT 模型,这个讨论可能会有帮助。特别感谢 @MaraScott@Jeremy8776 提供的见解。

  • ComfyUI:感谢 @okdalto 帮助实现 ComfyUI-PersonaLive 支持。

  • 实用脚本:感谢 @suruoxi 实现 download_weights.py,以及 @andchir 添加音频合并功能。

🎬 更多结果

👀 可视化结果

<table width="100%"> <tr> <td width="50%"> <video src="https://github.com/user-attachments/assets/cdc885ef-5e1c-4139-987a-2fa50fefd6a4" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="50%"> <video src="https://github.com/user-attachments/assets/014f7bae-74ce-4f56-8621-24bc76f3c123" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> </table> <table width="100%"> <tr> <td width="25%"> <video src="https://github.com/user-attachments/assets/1e6a0809-15d2-4cab-ae8f-8cf1728c6281" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/d9cf265d-9db0-4f83-81da-be967bbd5f26" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/86235139-b63e-4f26-b09c-d218466e8e24" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/238785de-3b4c-484e-9ad0-9d90e7962fee" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> <tr> <td width="25%"> <video src="https://github.com/user-attachments/assets/c71c4717-d528-4a98-b132-2b0ec8cec22d" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/7e11fe71-fd16-4011-a6b2-2dbaf7e343fb" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/f62e2162-d239-4575-9514-34575c16301c" controls="controls" style="max-width: 100%; display: block;"></video> </td> <td width="25%"> <video src="https://github.com/user-attachments/assets/813e7fbd-37e9-47d7-a270-59887fafeca5" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> </table>

🤺 对比

<table width="100%"> <tr> <td width="100%"> <video src="https://github.com/user-attachments/assets/36407cf9-bf82-43ff-9508-a794d223d3f7" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> <tr> <td width="100%"> <video src="https://github.com/user-attachments/assets/3be99b91-c6a1-4ca4-89e9-8fad42bb9583" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> <tr> <td width="100%"> <video src="https://github.com/user-attachments/assets/5bd21fe4-96ae-4be6-bf06-a7c476b04ec9" controls="controls" style="max-width: 100%; display: block;"></video> </td> </tr> </table>

⭐ 引用

如果您发现 PersonaLive 对您的研究有用,欢迎使用以下 BibTeX 引用我们的工作:

@article{li2025personalive,
  title={PersonaLive! Expressive Portrait Image Animation for Live Streaming},
  author={Li, Zhiyuan and Pun, Chi-Man and Fang, Chen and Wang, Jue and Cun, Xiaodong},
  journal={arXiv preprint arXiv:2512.11253},
  year={2025}
}

❤️ 致谢

本代码主要基于 Moore-AnimateAnyoneX-NeMoStreamDiffusionRAINLivePortrait 构建,感谢他们宝贵的贡献。

huaichang/PersonaLive

作者 huaichang

image-to-video diffusers
↓ 0 ♥ 114

创建时间: 2025-12-13 07:03:01+00:00

更新时间: 2025-12-26 08:59:09+00:00

在 Hugging Face 上查看

文件 (21)

.gitattributes
README.md
assets/demo_1.gif
assets/demo_2.gif
assets/demo_3.gif
assets/guide.png
assets/header.svg
assets/highlight.svg
assets/overview.png
pretrained_weights/.DS_Store
pretrained_weights/onnx/.DS_Store
pretrained_weights/onnx/unet_opt/unet_opt.onnx ONNX
pretrained_weights/onnx/unet_opt/unet_opt.onnx.data
pretrained_weights/personalive/denoising_unet.pth
pretrained_weights/personalive/motion_encoder.pth
pretrained_weights/personalive/motion_extractor.pth
pretrained_weights/personalive/pose_guider.pth
pretrained_weights/personalive/reference_unet.pth
pretrained_weights/personalive/temporal_module.pth
pretrained_weights/tensorrt/.DS_Store
pretrained_weights/tensorrt/unet_work(H100).engine