
EchoMimicV2 半身数字人一键脚本部署ubuntu22+python10+cude12.4
EchoMimicV2 半身数字人一键脚本部署ubuntu22+python10+cude12.4
参考文章:EchoMimicV2部署教程——AI 数字人半身动画超强引擎
和https://github.com/antgroup/echomimic_v2
系统Ubuntu 22.04.5 LTS
CUDA版本:12.4
Pytorch版本:2.5.1+cu124
显卡型号:Tesla P40
显存大小:22.37GB
精度:float16
环境
Ubuntu 22.04.5 LTS
CUDA版本:12.4
python=3.10
Pytorch版本:2.5.1+cu124
操作步骤
1、代码
打开https://github.com/antgroup/echomimic_v2
git clone https://github.com/antgroup/echomimic_v2.git
或者通过浏览器下载zip包
2、安装cuda12.4
选择cuda12.4原因是github上用的12.4
cuda官网12.4下载cuda_12.4.0_550.54.14_linux.run安装
#下载安装cuda12.4
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
sudo sh cuda_12.4.0_550.54.14_linux.run
# 插入以下环境变量
vim ~/.bashrc
#指定 CUDA Toolkit 12.4 ,服务器安装了多版本cuda,需要指定12.4
export PATH=/usr/local/cuda-12.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64:$LD_LIBRARY_PATH
#ecs保存退出
:wq!
#生效验证
source ~/.bashrc
nvcc -V
#输出结果显示12.4
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0
#下载代码
git clone https://github.com/antgroup/echomimic_v2.git
#修改一键脚本魔塔社区模型源
cd echomimic_v2
vim linux_setup.sh
#共用3处git clone 需要替换魔塔社区
git clone https://huggingface.co/BadToBest/EchoMimicV2
git clone https://huggingface.co/stabilityai/sd-vae-ft-mse
git clone https://huggingface.co/lambdalabs/sd-image-variations-diffusers
#分别替换为
git clone https://www.modelscope.cn/BadToBest/EchoMimicV2
git clone https://www.modelscope.cn/stabilityai/sd-vae-ft-mse
git clone https://www.modelscope.cn/gqy2468/sd-image-variations-diffusers.git
如图
使用conda创建虚拟环境,一键脚本安装
conda create -n echomimic python=3.10 -y
conda activate echomimic
cd echomimic_v2
#开始安装
sh linux_setup.sh
#运行app.py时可能需要peft依赖,提前安装
pip install peft
#设置web 外网和端口,运行app.py
export GRADIO_SERVER_NAME=0.0.0.0
export GRADIO_SERVER_PORT=8099
python app.py
如图部署成功
浏览器打开url:http://服务器IP:8099,例如:http://192.168.9.45:8099/
生成视频时候会有警告
修改__init__.py 109行添加:weights_only=True
vim echomimic_v2/src/models/whisper/whisper/__init__.py
其他警告忽略,再次运行python app.py,只能单卡,视频生成执行了很久,可能硬件原因,感觉不如硅基的heygem快,如图运行3个小时还没结束。
更多推荐
所有评论(0)