'LivePortrait' Is A FREE and Next-Level AI Deepfake Tool
Here's step-by-step guide to set up LivePortrait on your PC.
In the past couple of days, videos of animated portraits from single still images have been going viral on social media platforms like X, Reddit, and LinkedIn. These lifelike portrait animations were the results of a new and open-source AI tool called LivePortrait.
LivePortrait builds upon the face vid2vid framework, which animates still portraits using motion features from driving video sequences.
If you want to learn about how it works, check out the whitepaper here.
In this article, I will walk you through the step-by-step process of setting up LivePortrait on your local PC. At the end of this tutorial, you should be able to animate static photos like in the examples below:
The process is pretty simple, there will only be three steps that we need to do:
Setup LivePortrait
Run the Gradio web application
Generate animated portraits
Before diving into the step-by-step guide, make sure that your environment is set up or meets the minimum hardware requirements of LivePortrait.
Pre-requisites:
A capable GPU (I am using an NVIDIA RTX 3060 Ti with 8GB VRAM)
Download and install the latest Python 3.x
Download and install the latest Git
Windows 11 Pro OS
16 GB RAM and at least 10 GB local disk space
Set up LivePortrait
Clone the Repository: Open your terminal or command prompt and run the following command to clone the LivePortrait GitHub repository:
git clone https://github.com/xinntao/LivePortrait.git
This will create a new folder named ‘LivePortrait’ on your local disk. Alternatively, you can download the GitHub repository and open a terminal to the ‘LivePortrait’ folder.
2. Create a Conda Environment: We’ll use Conda to create a clean environment for LivePortrait. If you don’t have Conda installed on your system, check on this guide to install it.
Once you have Conda, run:
conda create -n LivePortrait python==3.9.18
This creates a new environment called ‘LivePortrait’ with Python 3.9.18.
3. Activate the Environment: Switch to your newly created environment by running:
conda activate LivePortrait
There will be no logs generated with this command.
4. Install Dependencies: Install all the packages LivePortrait needs with the following command:
pip install -r requirements.txt --user
Be warned that this step will download large files so be sure you have enough local disk space.
Download and extract the LivePortrait weights from here. The final file structure should look like this:
Keep reading with a 7-day free trial
Subscribe to Generative AI Publication to keep reading this post and get 7 days of free access to the full post archives.