GeneFace++ 是一个基于 PyTorch 的开源高保真度、可控制的语音驱动头像(talking head)生成项目。它通常需要较强的计算资源(推荐 NVIDIA GPU,显存 ≥ 16GB)和一定的深度学习基础。
git clone https://github.com/yerfor/GeneFacePlusPlus.git
cd GeneFacePlusPlusconda create -n genefacepp python=3.9 -y
conda activate genefacepppip install torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118pip install -r requirements.txtGeneFace++ 的训练数据通常来源于 单人或多人的说话视频。
data/
└── my_subject/
├── videos/
│ └── raw.mp4
├── audios/
│ └── raw.wav
└── landmarks/GeneFace++ 包含多个预处理阶段。
bash scripts/preprocess/extract_landmarks.sh主要功能:
GeneFace++ 使用 HuBERT / WavLM 作为音频表示。
bash scripts/preprocess/extract_audio_features.shbash scripts/preprocess/extract_motion.sh训练音频 → 面部运动(3DMM / landmarks)
python train.py --config configs/train_audio2motion.yaml重点参数:
batch_sizeaudio_encodermotion_type训练运动 → 面部图像生成
python train.py --config configs/train_motion2video.yaml关键点:
bash scripts/train/finetune.shtest_audio.wavpython inference.py \
--audio test_audio.wav \
--model_path checkpoints/genefacepp.pth \
--output result.mp4batch_sizeimg_size| 项目 | 推荐 |
|---|---|
| GPU | RTX 3090 / 4090 / A100 |
| 显存 | ≥ 16GB |
| 内存 | ≥ 32GB |
| 存储 | SSD,≥ 100GB |
如果你愿意,我可以:
只要告诉我你的 GPU 型号 + 数据情况 即可。