# PersonaLive **Repository Path**: sheldongchen/PersonaLive ## Basic Information - **Project Name**: PersonaLive - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-29 - **Last Updated**: 2025-12-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
PersonaLive

Expressive Portrait Image Animation for Live Streaming

#### [Zhiyuan Li1,2,3](https://huai-chang.github.io/) Β· [Chi-Man Pun1,πŸ“ͺ](https://cmpun.github.io/) Β· [Chen Fang2](http://fangchen.org/) Β· [Jue Wang2](https://scholar.google.com/citations?user=Bt4uDWMAAAAJ&hl=en) Β· [Xiaodong Cun3,πŸ“ͺ](https://vinthony.github.io/academic/) 1 University of Macau    2 [Dzine.ai](https://www.dzine.ai/)    3 [GVC Lab, Great Bay University](https://gvclab.github.io/) [![GitHub](https://img.shields.io/github/stars/GVCLab/PersonaLive?style=social)](https://github.com/GVCLab/PersonaLive) highlight   
## πŸ“‹ TODO - [ ] If you find PersonaLive useful or interesting, please give us a Star🌟! Your support drives us to keep improving. - [ ] Fix bugs (If you encounter any issues, please feel free to open an issue or contact me! πŸ™) - [x] **[2025.12.29]** πŸ”₯ Enhance WebUI (Support reference image replacement). - [x] **[2025.12.22]** πŸ”₯ Supported streaming strategy in offline inference to generate long videos on 12GB VRAM! - [x] **[2025.12.17]** πŸ”₯ [ComfyUI-PersonaLive](https://github.com/okdalto/ComfyUI-PersonaLive) is now supported! (Thanks to [@okdalto](https://github.com/okdalto)) - [x] **[2025.12.15]** πŸ”₯ Release `paper`! - [x] **[2025.12.12]** πŸ”₯ Release `inference code`, `config`, and `pretrained weights`! ## βš–οΈ Disclaimer - [x] This project is released for **academic research only**. - [x] Users must not use this repository to generate harmful, defamatory, or illegal content. - [x] The authors bear no responsibility for any misuse or legal consequences arising from the use of this tool. - [x] By using this code, you agree that you are solely responsible for any content generated. ## βš™οΈ Framework Image 1 We present PersonaLive, a `real-time` and `streamable` diffusion framework capable of generating `infinite-length` portrait animations. ## πŸš€ Getting Started ### πŸ›  Installation ``` # clone this repo git clone https://github.com/GVCLab/PersonaLive cd PersonaLive # Create conda environment conda create -n personalive python=3.10 conda activate personalive # Install packages with pip pip install -r requirements_base.txt ``` ### ⏬ Download weights Option 1: Download pre-trained weights of base models and other components ([sd-image-variations-diffusers](https://huggingface.co/lambdalabs/sd-image-variations-diffusers) and [sd-vae-ft-mse](https://huggingface.co/stabilityai/sd-vae-ft-mse)). You can run the following command to download weights automatically: ```bash python tools/download_weights.py ``` Option 2: Download pre-trained weights into the `./pretrained_weights` folder from one of the below URLs: Finally, these weights should be organized as follows: ``` 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 ``` ### 🎞️ Offline Inference Run offline inference with the default configuration: ``` python inference_offline.py ``` * `-L`: Max number of frames to generate. (Default: 100) * `--use_xformers`: Enable xFormers memory efficient attention. (Default: True) * `--stream_gen`: Enable streaming generation strategy. (Default: True) * `--reference_image`: Path to a specific reference image. Overrides settings in config. * `--driving_video`: Path to a specific driving video. Overrides settings in config. ⚠️ Note for RTX 50-Series (Blackwell) Users: xformers is not yet fully compatible with the new architecture. To avoid crashes, please disable it by running: ``` python inference_offline.py --use_xformers False ``` ### πŸ“Έ Online Inference #### πŸ“¦ Setup Web UI ``` # install Node.js 18+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash nvm install 18 source web_start.sh ``` #### 🏎️ Acceleration (Optional) Converting the model to TensorRT can significantly speed up inference (~ 2x ⚑️). Building the engine may take about `20 minutes` depending on your device. Note that TensorRT optimizations may lead to slight variations or a small drop in output quality. ``` # Install packages with pip pip install -r requirements_trt.txt # Converting the model to TensorRT python torch2trt.py ``` πŸ’‘ **PyCUDA Installation Issues**: If you encounter a "Failed to build wheel for pycuda" error during the installation above, please follow these steps: ``` # Install PyCUDA manually using Conda (avoids compilation issues): conda install -c conda-forge pycuda "numpy<2.0" # Open requirements_trt.txt and comment out or remove the line "pycuda==2024.1.2" # Install other packages with pip pip install -r requirements_trt.txt # Converting the model to TensorRT python torch2trt.py ``` ⚠️ The provided TensorRT model is from an `H100`. We recommend `ALL users` (including H100 users) re-run `python torch2trt.py` locally to ensure best compatibility. #### ▢️ Start Streaming ``` python inference_online.py --acceleration none (for RTX 50-Series) or xformers or tensorrt ``` Then open `http://0.0.0.0:7860` in your browser. (*If `http://0.0.0.0:7860` does not work well, try `http://localhost:7860`) **How to use**: Upload Image ➑️ Fuse Reference ➑️ Start Animation ➑️ Enjoy! πŸŽ‰
PersonaLive
**Regarding Latency**: Latency varies depending on your device's computing power. You can try the following methods to optimize it: 1. Lower the "Driving FPS" setting in the WebUI to reduce the computational workload. 2. You can increase the multiplier (e.g., set to `num_frames_needed * 4` or higher) to better match your device's inference speed. https://github.com/GVCLab/PersonaLive/blob/6953d1a8b409f360a3ee1d7325093622b29f1e22/webcam/util.py#L73 ## πŸ“š Community Contribution Special thanks to the community for providing helpful setups! πŸ₯‚ * **Windows + RTX 50-Series Guide**: Thanks to [@dknos](https://github.com/dknos) for providing a [detailed guide](https://github.com/GVCLab/PersonaLive/issues/10#issuecomment-3662785532) on running this project on Windows with Blackwell GPUs. * **TensorRT on Windows**: If you are trying to convert TensorRT models on Windows, [this discussion](https://github.com/GVCLab/PersonaLive/issues/8) might be helpful. Special thanks to [@MaraScott](https://github.com/MaraScott) and [@Jeremy8776](https://github.com/Jeremy8776) for their insights. * **ComfyUI**: Thanks to [@okdalto](https://github.com/okdalto) for helping implement the [ComfyUI-PersonaLive](https://github.com/okdalto/ComfyUI-PersonaLive) support. * **Useful Scripts**: Thanks to [@suruoxi](https://github.com/suruoxi) for implementing `download_weights.py`, and to [@andchir](https://github.com/andchir) for adding audio merging functionality. ## 🎬 More Results #### πŸ‘€ Visualization results
#### 🀺 Comparisons
## ⭐ Citation If you find PersonaLive useful for your research, welcome to cite our work using the following BibTeX: ```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} } ``` ## ❀️ Acknowledgement This code is mainly built upon [Moore-AnimateAnyone](https://github.com/MooreThreads/Moore-AnimateAnyone), [X-NeMo](https://byteaigc.github.io/X-Portrait2/), [StreamDiffusion](https://github.com/cumulo-autumn/StreamDiffusion), [RAIN](https://pscgylotti.github.io/pages/RAIN/) and [LivePortrait](https://github.com/KlingTeam/LivePortrait), thanks to their invaluable contributions.