在linux服务器上运行SadTalker(数字人)

 1.安装anaconda,Python and git

     此处不是重点,参考站内其他文章即可

  1.  Anaconda, Python 【linux系统】如何在服务器上安装Anaconda-CSDN博客

  2. 安装git[Linux] linux系统安装git_linux安装git-CSDN博客

 2.下载文件和环境
 

OpenTalker/SadTalker: [CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation (github.com)

git clone https://github.com/OpenTalker/SadTalker.git

cd SadTalker 

conda create -n sadtalker python=3.8

conda activate sadtalker

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

conda install ffmpeg

pip install -r requirements.txt

### Coqui TTS is optional for gradio demo. 
### pip install TTS
安装官方链接一步步操作即可

3.安装对应的模型

保证自己在sadtalker的路径下,输入  bash scripts/download_models.sh

4.运行

python inference.py  --driven_audio /opt/source-code/SadTalker/examples/driven_audio/bus_chinese.wav --source_image /opt/source-code/SadTalker/examples/source_image/full_body_1.png --enhancer gfpgan --preprocess full --still

5.常见bug

1.环境下载时出现无对应版本的软件包

ERROR: Could not find a version that satisfies the requirement tb-nightly (from basicsr) (from versions: none) ERROR: No matching distribution found for tb-nightly

方法:添加下载源,加入阿里源,腾讯源,清华源

2.加载模型时出现问题,主要是因为网络问题中断下载,导致模型只下载了一部分,可以注意自己的模型大小。

safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer

方法:删除下载好的模型,重新运行命令

  • 22
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值