部署DiffPortrait360需要分步骤完成环境准备:
Hardware preparation
- 必须使用NVIDIA GPU(支持CUDA)
- 最低配置:30GB显存(生成32帧)
- 推荐配置:80GB显存(如A6000显卡)
software installation
- 确认CUDA版本(推荐12.2):通过
nvcc --version
probe - 创建Python 3.9的Conda环境:
conda create -n diffportrait360 python=3.9
conda activate diffportrait360
- Clone the code repository:
git clone https://github.com/FreedomGu/DiffPortrait360.git
- Install dependencies:
- go into
diffportrait360_release
catalogs - fulfillment
pip install -r requirements.txt
- go into
Model deployment
从Hugging Face下载三个预训练模型(PANO_HEAD_MODEL/Head_Back_MODEL/Diff360_MODEL)并修改inference.sh
中的路径参数。最后通过torch.cuda.is_available()
验证GPU可用性。
This answer comes from the articleDiffPortrait360: Generate 360-degree head views from a single portraitThe