检查驱动:
nvidia-smisudo apt update
sudo apt install -y git ffmpeg build-essentialconda create -n genefacepp python=3.9 -y
conda activate genefaceppgit clone https://github.com/yerfor/GeneFacePlusPlus.git
cd GeneFacePlusPlus例如 CUDA 11.8:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118pip install -r requirements.txt⚠️ 常见问题:
face_alignment 可能编译失败 → 使用预编译版本opencv 与 ffmpeg 冲突 → 用 conda 安装 opencvpip install opencv-python-headlessGeneFace++ 需要以下模型:
从 README 或 HuggingFace 下载:
autoregressive.pthlatent_diffusion.pthhifigan.pthface_parser.pth放入:
checkpoints/bash scripts/download_sample_data.sh.wavpython inference.py \
--a audio.wav \
--r reference.mp4 \
--o output.mp4或使用官方脚本:
bash scripts/infer.sh--batch_sizeface_alignment 重跑预处理ffmpeg -i input.wav -ar 16000 output.wav可用:
如果你愿意,我可以:
直接告诉我你的使用场景即可。