git clone https://github.com/Tony-Nemo/GeneFacePlusPlus.git
cd GeneFacePlusPlusconda create -n geneface python=3.9
conda activate geneface或使用 venv:
python -m venv venv
venv\Scripts\activate不要用仓库默认命令,先手动装:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118pip install -r requirements.txt⚠️ Windows 常见问题:
numba 可能需要:conda install numbapyrender Windows 基本不可用(需要 OpenGL)face_alignment 可能报错,建议:pip install face-alignment==1.3.5pip install librosa soundfile imageio imageio-ffmpeg官方文档:
bash scripts/download_pretrained.sh❌ Windows 不能直接跑 bash
手动操作:
genefaceplusplus.pthcheckpoints/python inference/genefacepp_inference.py \
--a audio.wav \
--r reference.jpg \
--o output.mp4如果报错:
No module named 'pyrender' → 注释掉GL context 错误 → 用 WSL2wsl --install在 Ubuntu 里照 Linux 教程走,成功率 90%+
官方有 Dockerfile,但 Windows 下需要:
| 问题 | 解决 |
|---|---|
| Python 版本错误 | 用 3.9 |
| CUDA 不匹配 | 重装 PyTorch |
| pyrender 报错 | 用 WSL2 |
| ffmpeg 找不到 | 装 ffmpeg 并加 PATH |
✅ 能跑,但不适合纯 Windows 新手
✅ 最稳:Windows + WSL2 + Ubuntu
✅ 显存不够会很慢
如果你愿意,我可以:
你现在是 纯 Windows 还是愿意用 WSL?