Skip to content

How-ToGPU

How to Animate a Portrait Photo Locally with LivePortrait

LivePortrait is a free, open-source AI tool that animates a still portrait using the head movements and expressions from a driving video, running on your own NVIDIA graphics card. Using the developers' README, we cover the Windows one-click package, the manual install, driving-video tips, the Gradio interface and licence limits.

By , Systems & Technical Editor

4 min read

How to Animate a Portrait Photo Locally with LivePortrait

LivePortrait is a free, open-source AI tool that makes a still portrait copy the head movements and facial expressions of a "driving" video. It was developed by researchers at Kuaishou Technology, and it runs on your own PC rather than in a cloud app. This guide follows the project's own README and Windows package listing.

Only animate photos of people who have agreed to it, and don't use the results to mislead anyone. Animated faces are easy to mistake for real footage.

What you need

  • A Windows or Linux PC with an NVIDIA graphics card. The README gives install steps for Linux and Windows using CUDA builds of PyTorch, and says Animals mode is only tested on Linux and Windows with an NVIDIA GPU. macOS on Apple Silicon is supported for Humans mode, but the developers warn it may be about 20 times slower than an RTX 4090.

  • A clear, front-facing source photo of the face you want to animate.

  • A driving video of a face making the movements you want, or one of the example clips that ship with LivePortrait.

  • FFmpeg, which the README lists as a requirement for the manual install.

The README doesn't publish a minimum VRAM figure. Our suggestion: a 12GB card such as the ASUS RTX 3060 12GB Dual Gaming OC V2 or a 16GB card such as the Gigabyte 5060 Ti 16GB gives you headroom if you also want to run other AI video tools. Our VRAM guide explains how much memory different AI jobs tend to need.

Option 1: the Windows one-click package

The easiest route on Windows is the developers' one-click package on Hugging Face (cleardusk/LivePortrait-Windows). The newest file listed there is LivePortrait-Windows-v20240829.zip, which the README says supports auto-updates.

  1. Download the latest zip from the LivePortrait-Windows page on Hugging Face.

  2. Unzip it to a folder with plenty of free space.

  3. Double-click run_windows.bat, as the README describes, and wait for the interface to open in your browser.

Option 2: manual install

If you'd rather install it yourself, or you're on Linux, the README's steps are:

  1. Install Git, Conda and FFmpeg.

  2. Clone the repository and create a Python 3.10 environment: conda create -n LivePortrait python=3.10, then conda activate LivePortrait.

  3. Install a CUDA build of PyTorch that matches your CUDA version, then run pip install -r requirements.txt. The README notes that on Windows some newer CUDA versions, such as 12.4 and 12.6, may cause problems, and suggests 11.8 for stability.

  4. Download the pretrained weights into pretrained_weights with huggingface-cli download KlingTeam/LivePortrait --local-dir pretrained_weights --exclude "*.git*" "README.md" "docs".

  5. Run python inference.py as a first test. If it works, you'll get animations/s6--d0_concat.mp4, showing the driving video, the input and the result side by side.

If PyTorch can't see your graphics card at this point, see our guide to fixing "CUDA not available" in PyTorch.

Animate your own photo

From the command line, point LivePortrait at your own source (-s) and driving video (-d), for example python inference.py -s my-photo.jpg -d my-driving-clip.mp4. You can also use a video as the source to edit a portrait video, a feature the developers added in July 2024.

For your own driving videos, the README recommends:

  • cropping to a 1:1 aspect ratio (such as 512 x 512), or adding --flag_crop_driving_video to crop automatically

  • keeping the frame focused on the head, with little shoulder movement

  • making sure the first frame shows a front-facing face with a neutral expression

LivePortrait can also save the motion from a driving video as a .pkl template. The developers say this speeds up inference and helps protect privacy, because you can reuse the motion without keeping the original video.

Use the Gradio interface

For a point-and-click interface, run python app.py (Humans mode). Since August 2024 the interface also includes image-driven mode, regional control and precise portrait editing, such as adjusting the pose or expression of a still image. Animals mode has its own interface (python app_animals.py), which the README says is only tested on Linux with an NVIDIA GPU.

On Linux, the --flag_do_torch_compile option triggers a one-off optimisation of about a minute, after which the developers say inference is 20-30% faster. They note it isn't supported on Windows or macOS.

How fast is it?

The developers' own figures, measured for a single frame on an RTX 4090 with torch.compile, put the largest stage (the SPADE generator) at 7.59ms and the warping module at 5.21ms, with the other modules under 1ms each. Those are the developers' numbers on a top-end card, not Forge PC results, and your own speed will depend on your GPU. You can run python speed.py to check each module on your own NVIDIA card.

Other ways to run LivePortrait

The README lists community projects that build on LivePortrait, including ComfyUI nodes (ComfyUI-LivePortraitKJ and ComfyUI-AdvancedLivePortrait), a Stable Diffusion WebUI extension, and FasterLivePortrait, a TensorRT version for real-time use. If you already use ComfyUI, see how to install ComfyUI on Windows. These are third-party projects, so check each one's own instructions.

Licence note

LivePortrait's code is released under the MIT licence, but its LICENSE file says the InsightFace detection models it uses are for non-commercial research only. If you want to use LivePortrait commercially, the developers say you should replace those detection models.

The bottom line

On Windows with an NVIDIA graphics card, the quickest way to try LivePortrait is the one-click package from Hugging Face: unzip it, run run_windows.bat and animate a front-facing photo with one of the example driving clips. Linux users, and anyone who wants the latest code, can follow the Conda install in the README instead. Use 1:1, head-focused driving videos that start with a neutral expression, and only animate faces you have permission to use.

In this article

Sources

  1. 01KlingAIResearch (Kuaishou), LivePortrait README on GitHub
  2. 02KlingAIResearch (Kuaishou), LivePortrait LICENSE on GitHub
  3. 03cleardusk, LivePortrait-Windows one-click package on Hugging Face
  4. 04Guo et al., LivePortrait: Efficient Portrait Animation with Stitching and Retargeting Control (arXiv)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free Local AI Lip-Sync and Talking-Head Tools for PC in 2026

Best Picks

Best Free Local AI Lip-Sync and Talking-Head Tools for PC in 2026

You don't need a subscription to try AI lip sync or talking-head animation. We pick the best free tools that run on your own PC in 2026, MuseTalk, LatentSync, LivePortrait and Wav2Lip, using each project's documentation, and explain what each is best for, the VRAM it needs and the licence limits.

Hannah Vance4 min

LatentSync vs MuseTalk: Which Local AI Lip-Sync Tool Should You Use?

Versus

LatentSync vs MuseTalk: Which Local AI Lip-Sync Tool Should You Use?

LatentSync and MuseTalk are two of the best-known free tools for AI lip sync on your own PC. Using each project's documentation, we compare how they work, VRAM needs, installation on Windows and Linux, tuning settings, real-time support, training and licences, to help you choose the right one for your graphics card.

Callum Reid4 min

GIGABYTE Control Center RGB Lighting Linked to GeForce Game Stutter

News

GIGABYTE Control Center RGB Lighting Linked to GeForce Game Stutter

An independent Bilibili investigation has linked game stutter on a GIGABYTE GeForce system to GIGABYTE Control Center's RGB lighting commands clashing with newer NVIDIA drivers. A newer GCC build reportedly fixes it, though that isn't verified, and a claim that GIGABYTE dismissed the GCC team is unconfirmed. Here's what was found and what to do.

Eleanor Shaw3 min

How to Set Up an Elgato Facecam in Elgato Studio (Camera Hub Replacement)

How-To

How to Set Up an Elgato Facecam in Elgato Studio (Camera Hub Replacement)

Elgato Studio 2.0 has replaced Camera Hub for Facecam owners. Using Elgato's official guides, this walkthrough covers requirements, installing Studio, firmware updates, exposure, white balance, framing and noise reduction, saving settings to the camera with Flash Memory, recording, and what to do on Windows 10.

Marcus Thorne4 min