LivePortrait
Bring portraits to life!
Install / Use
/learn @KlingAIResearch/LivePortraitREADME
🔥 Updates
2025/06/01: 🌍 Over the past year, LivePortrait has 🚀 become an efficient portrait-animation (humans, cats and dogs) solution adopted by major video platforms—Kuaishou, Douyin, Jianying, WeChat Channels—as well as numerous startups and creators. 🎉2025/01/01: 🐶 We updated a new version of the Animals model with more data, see here.2024/10/18: ❗ We have updated the versions of thetransformersandgradiolibraries to avoid security vulnerabilities. Details here.2024/08/29: 📦 We update the Windows one-click installer and support auto-updates, see changelog.2024/08/19: 🖼️ We support image driven mode and regional control. For details, see here.2024/08/06: 🎨 We support precise portrait editing in the Gradio interface, inspired by ComfyUI-AdvancedLivePortrait. See here.2024/08/05: 📦 Windows users can now download the one-click installer for Humans mode and Animals mode now! For details, see here.2024/08/02: 😸 We released a version of the Animals model, along with several other updates and improvements. Check out the details here!2024/07/25: 📦 Windows users can now download the package from HuggingFace. Simply unzip and double-clickrun_windows.batto enjoy!2024/07/24: 🎨 We support pose editing for source portraits in the Gradio interface. We’ve also lowered the default detection threshold to increase recall. Have fun!2024/07/19: ✨ We support 🎞️ portrait video editing (aka v2v)! More to see here.2024/07/17: 🍎 We support macOS with Apple Silicon, modified from jeethu's PR #143.2024/07/10: 💪 We support audio and video concatenating, driving video auto-cropping, and template making to protect privacy. More to see here.2024/07/09: 🤗 We released the HuggingFace Space, thanks to the HF team and Gradio!2024/07/04: 😊 We released the initial version of the inference code and models. Continuous updates, stay tuned!2024/07/04: 🔥 We released the homepage and technical report on arXiv.
Introduction 📖
This repo, named LivePortrait, contains the official PyTorch implementation of our paper LivePortrait: Efficient Portrait Animation with Stitching and Retargeting Control. We are actively updating and improving this repository. If you find any bugs or have suggestions, welcome to raise issues or submit pull requests (PR) 💖.
Getting Started 🏁
1. Clone the code and prepare the environment 🛠️
[!Note] Make sure your system has
git,conda, andFFmpeginstalled. For details on FFmpeg installation, see how to install FFmpeg.
git clone https://github.com/KlingTeam/LivePortrait
cd LivePortrait
# create env using conda
conda create -n LivePortrait python=3.10
conda activate LivePortrait
For Linux 🐧 or Windows 🪟 Users
X-Pose, required by Animals mode, is a dependency that needs to be installed. The step of Check your CUDA versions is optional if you only want to run Humans mode.
Firstly, check your current CUDA version by:
nvcc -V # example versions: 11.1, 11.8, 12.1, etc.
Then, install the corresponding torch version. Here are examples for different CUDA versions. Visit the PyTorch Official Website for installation commands if your CUDA version is not listed:
# for CUDA 11.1
pip install torch==1.10.1+cu111 torchvision==0.11.2 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
# for CUDA 11.8
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
# for CUDA 12.1
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
# ...
Note: On Windows systems, some higher versions of CUDA (such as 12.4, 12.6, etc.) may lead to unknown issues. You may consider downgrading CUDA to version 11.8 for stability. See the downgrade guide by @dimitribarbot.
</details>Finally, install the remaining dependencies:
pip install -r requirements.txt
For macOS with Apple Silicon Users
The X-Pose dependency does not support macOS, so you can skip its installation. While Humans mode works as usual, Animals mode is not supported. Use the provided requirements file for macOS with Apple Silicon:
# for macOS with Apple Silicon users
pip install -r requirements_macOS.txt
2. Download pretrained weights 📥
The easiest way to download the pretrained weights is from HuggingFace:
# !pip install -U "huggingface_hub[cli]"
huggingface-cli download KlingTeam/LivePortrait --local-dir pretrained_weights --exclude "*.git*" "README.md" "docs"
If you cannot access to Huggingface, you can use hf-mirror to download:
# !pip install -U "huggingface_hub[cli]"
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download KlingTeam/LivePortrait --local-d
Related Skills
docs-writer
98.7k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
329.7kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
arscontexta
2.8kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
