wsl --install安装 Ubuntu 22.04,重启后进入 Ubuntu 终端。
git clone https://github.com/liuvv11/GeneFacePlusPlus.git
cd GeneFacePlusPlus
conda env create -f environment.yml
conda activate geneface++✅ 优点
- 和官方 Linux 环境一致
- 不用改代码
- 推理 / 训练都能跑
❌ 缺点
- 需要 WSL(但已经很成熟了)
conda create -n geneface python=3.9
conda activate genefacepip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118pip install -r requirements.txt⚠️ 常见问题:
numba / opencv 在 Windows 可能报错docker build -t geneface++ .
docker run --gpus all -it geneface++✅ 适合:
- 不想污染环境
- 准备长期用
python inference.py \
--a2m_model_path checkpoints/a2m \
--postnet_model_path checkpoints/postnet \
--audio_path test.wav \
--out_video out.mp4| 问题 | 解决 |
|---|---|
| CUDA not available | 重装对应版本 PyTorch |
| ffmpeg 找不到 | 装 ffmpeg 并加 PATH |
| 中文路径报错 | 全部用英文路径 |
| 显存爆炸 | 降低 batch / 分辨率 |
✅ 新手 / 求稳:WSL2
✅ 不想折腾:Docker
⚠️ 纯 Windows 直跑:能跑但不推荐
如果你愿意,我可以:
你现在是想「推理」还是「训练」?