以下是在CentOS上安装GeneFace++的攻略:
确保系统安装了Git、Python 3.9+,并安装了适当的GPU支持(CUDA版本需匹配)。建议使用conda或venv创建新的Python环境。
git clone https://github.com/yerfor/GeneFacePlusPlus.git
,然后进入项目目录cd GeneFacePlusPlus
。conda create -n geneface python=3.9
创建环境,再用conda activate geneface
激活。pip install -r requirements.txt
。sudo yum install -y cmake
。设置环境变量export PYTHONPATH=$(pwd):$PYTHONPATH
,然后运行示例脚本python inference/genefacepp_infer.py --a2m_ckpt=checkpoints/audio2motion_vae --head_ckpt=checkpoints/motion2video_nerf/may_head --torso_ckpt=checkpoints/motion2video_nerf/may_torso --drv_aud=data/raw/val_wavs/example.wav --out_name=demo_output.mp4
,记得替换音频文件路径为实际路径。