sudo yum update -y
sudo yum install -y epel-releasesudo yum groupinstall -y "Development Tools"
sudo yum install -y \
git wget curl unzip \
cmake ffmpeg \
mesa-libGL mesa-libEGLCentOS 自带 Python 太老,强烈建议用 conda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc创建环境:
conda create -n geneface python=3.9 -y
conda activate geneface查看你的显卡驱动支持的 CUDA:
nvidia-smi例如 CUDA 11.8:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118无 GPU(仅测试):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpugit clone https://github.com/liangchen666/GenefacePlusPlus.git
cd GenefacePlusPlus安装依赖:
pip install -r requirements.txt常见额外依赖(CentOS 易缺):
pip install librosa soundfile numpy==1.23.5GeneFace++ 需要:
按官方 README:
bash scripts/download_pretrained.shinputs/
├── audio.wav
└── ref_video.mp4sudo yum install -y ffmpeg
# 或
conda install -c conda-forge ffmpegCentOS 7 可能太老:
strings /lib64/libc.so.6 | grep GLIBC若不足,建议用 CentOS 8 / Rocky / Alma
export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128python inference.py \
--audio inputs/audio.wav \
--video inputs/ref_video.mp4 \
--out output.mp4| 项目 | 建议 |
|---|---|
| 系统 | CentOS 8+ |
| GPU | RTX 3060+ |
| 显存 | ≥ 8GB |
| 内存 | ≥ 16GB |
如果你愿意,我可以:
你现在是 有 GPU 还是纯 CPU?