LivePortrait FAQ
This document compiles common questions and solutions encountered during LivePortrait usage.
Installation Issues
CUDA Version Incompatibility
Problem: CUDA version incompatibility warning when installing PyTorch.
Solution: First confirm your system CUDA version using nvcc -V, then install the corresponding PyTorch version. If unsure about CUDA version, you can install the CPU version for testing, but inference speed will be extremely slow.
Windows Installation Failure
Problem: Errors during installation or runtime on Windows systems.
Solution: Windows users are advised to download the one-click installer and run directly after extraction. If encountering CUDA issues, try downgrading CUDA to version 11.8. Some antivirus software may block dependency installation; temporarily disable antivirus software and try again.
Pretrained Model Download Failure
Problem: Unable to download model weights from HuggingFace.
Solution: Try using the domestic mirror site by setting the HF_ENDPOINT environment variable to https://hf-mirror.com. You can also download model files from Google Drive or Baidu Netdisk.
Insufficient VRAM
Problem: Out of Memory error during inference.
Solution: Try reducing the input image resolution. Use the --scale parameter to adjust output size. Close other programs that consume large amounts of VRAM. If using batch processing, reduce the batch size.
Runtime Issues
Inference Speed Too Slow
Problem: Inference speed is much slower than expected.
Solution: Confirm you are using an NVIDIA GPU rather than CPU. Check if CUDA is working properly (run python -c "import torch; print(torch.cuda.is_available())"). Enable torch.compile acceleration. Consider upgrading graphics drivers or using a more powerful GPU.
Abnormal Output Video
Problem: Generated videos have画面 distortion or color abnormalities.
Solution: Check if the driving video meets specifications. Ensure the first frame of the driving video is a frontal neutral expression. Try using automatic cropping (--flag_crop_driving_video).
Animal Mode Cannot Run
Problem: Unable to use animal mode.
Solution: Confirm your system is Linux or Windows with an NVIDIA GPU. Install X-Pose dependency as described in the installation guide. Download animal model weights from HuggingFace. Animal mode is not supported on macOS.
Gradio Interface Cannot Start
Problem: Cannot access the web interface after running app.py.
Solution: Check if the port is in use; specify another port using --server_port. Confirm firewall allows access to the corresponding port. Check terminal output for error messages.
Effect Issues
Unnatural Facial Expressions
Problem: Generated animations have stiff or unnatural expressions.
Solution: Choose driving videos with richer expressions. Adjust the --driving_multiplier parameter. Ensure the facial angle difference between source image and driving video is not too large.
Inconsistent Eye Direction
Problem: The subject's gaze direction from the driving video is not correctly transferred to the target portrait.
Solution: This is a current technical limitation. You can try selecting driving videos with more defined gaze directions or wait for future version updates.
Limited Head Rotation Range
Problem: Head cannot rotate to the desired angle.
Solution: Use the --flag_stitching parameter to adjust stitching settings. Head rotation range is limited by available facial information in the original portrait. Try using a front-facing photo as the source.
Desynchronized Lip Movements
Problem: Lip movements are not synchronized with the driving video.
Solution: Ensure the driving video's audio and video are synchronized. Check if the source image's mouth is naturally open. Try using a different driving video.
Technical Issues
Incorrect Model Weights Directory Structure
Problem: Cannot find model files.
Solution: Confirm the pretrained_weights directory structure is correct. Refer to the directory structure explanation in the GitHub repository. Delete the directory and redownload the models.
Dependency Version Conflicts
Problem: Version conflict warnings when installing dependencies.
Solution: Create a fresh Python environment for installation. Uninstall conflicting packages and reinstall specified versions. Use the versions specified in requirements.txt.
macOS Runtime Errors
Problem: Errors when running on macOS.
Solution: For Apple Silicon macOS, set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1. Confirm you are using dependencies from requirements_macOS.txt. Intel-based Macs may not run properly.
Security and Ethics
How to Identify Deepfake Content
Problem: How to identify deepfake content generated by LivePortrait.
Solution: Current technology generates results with identifiable visual artifacts. Professional deepfake detection tools can identify most synthetic content. Please use this technology responsibly.
Usage Limitations
Problem: What usage limitations does LivePortrait have.
Solution: Please comply with local laws and regulations. Do not use for creating fake news, fraud, or other malicious purposes. The project does not assume legal responsibility for generated results. Relevant persons should be informed when using this technology.
Performance Optimization
How to Improve Inference Speed
Suggestions: Use more powerful GPU hardware. Enable torch.compile acceleration. Use motion templates to avoid repeated calculations. Reduce output resolution. Disable unnecessary features.
Batch Processing
Problem: How to process multiple videos at once.
Suggestions: Write scripts to loop through inference.py calls. Modify inference code to support batch input. Use queues to manage multiple tasks.
Community Support
Getting Help
Problem: Unable to resolve encountered issues.
Solutions: Visit the GitHub repository Issues page to search for similar problems. Check project documentation and README. Seek help in community discussion forums. Check for relevant tutorials or video tutorials.
Reporting Bugs
Problem: Found software bugs.
Solutions: Submit an Issue on the GitHub repository with detailed reproduction steps, system environment information, and error logs to help developers investigate the problem.
