🔥 Optimized for **Human Portrait Animation** on simple CPU machines (e.g., Core i3, 8GB RAM) 🔥
This repository is a specialized version of LivePortrait, optimized for execution on low-end hardware and CPU-only systems. It focuses exclusively on Human Mode to reduce disk space (by ~1.5GB) and overhead.
- CPU Inference: Pre-configured for stable CPU performance.
- Low Memory Footprint: Efficiently runs on systems with 8GB RAM.
- Simplified Setup: One-click batch files for Windows with pre-configured environment paths.
- Human-Centric: All animal mode components and large weights have been removed for speed and clarity.
# RECOMMENDED: create env using conda
conda env create -f environment.yml
conda activate LivePortraitThe environment.yml handles all dependencies. Note: This setup uses gradio==4.44.1 and gradio-client==1.3.0 to resolve schema processing issues and localhost connectivity bugs specific to Windows/Conda environments.
Stability Fixes Applied:
- Default
server_nameset to127.0.0.1for local stability. show_api=Falseandmax_threads=1inapp.pyto prevent startup crashes.
Download weights and place them in ./pretrained_weights. The directory structure should match this (Human models only).
Simply double-click run_app.bat. This handles all necessary environment paths (including SSL DLL fixes for Conda).
python inference.py -s assets/examples/source/s9.jpg -d assets/examples/driving/d0.mp4Launch the web interface by running:
python app.pyOr use the provided run_app.bat.
This project is based on the original LivePortrait by KwaiVGI. We thank the authors for their groundbreaking work in efficient portrait animation.
@article{guo2024liveportrait,
title = {LivePortrait: Efficient Portrait Animation with Stitching and Retargeting Control},
author = {Guo, Jianzhu and Zhang, Dingyun and Liu, Xiaoqiang and Zhong, Zhizhou and Zhang, Yuan and Wan, Pengfei and Zhang, Di},
journal = {arXiv preprint arXiv:2407.03168},
year = {2024}
}