本地部署aniportrait

要求python >=2.10

cuda 118

下载代码:

 git clone https://github.com/Zejun-Yang/AniPortrait.git

创建虚拟环境:

conda create -n aniportrait python=2.10

conda activate aniportrait


pip install -r requirements.txt

出现错误:

WARNING: Ignoring version 0.2.5 of torchsde since it has invalid metadata:
Requested torchsde==0.2.5 from https://pypi.tuna.tsinghua.edu.cn/packages/73/8d/efd3e7b31ea854d0bd6886aa3cf44914adce113a6d460850af41ac1dd4dd/torchsde-0.2.5-py3-none-any.whl (from -r requirements.txt (line 24)) has invalid metadata: .* suffix can only be used with `==` or `!=` operators
    numpy (>=1.19.*) ; python_version >= "3.7"
           ~~~~~~~^
Please use pip<24.1 if you need to use this version.
ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement torchsde==0.2.5 (from versions: 0.2.5, 0.2.6)
ERROR: No matching distribution found for torchsde==0.2.5

No matching distribution found for torchsde==0.2.5

解决方法,降级pip:

pip -V
pip install pip==23.3

然后下载模型文件,模型文件共14.8G,我会放到百度网盘里,

链接:https://pan.baidu.com/s/1DGUE1cZwfxZlkiZ_LguRUw?pwd=hgmw

提取码:hgmw

把压缩包下载到电脑上之后,解压出来,将pretrained_model文件夹复制到AniPortrait项目内。文件夹结构目录如下:

然后在cmd终端里输入如下命令,启动应用UI界面

python -m scripts.app

稍等一会,看到输出信息http://127.0.0.1:7860之后,打开浏览器,打开这个网址就可以看到webui界面

如果选择参考视频的话,视频宽高比例和图片一致,图片人脸朝向和参考视频内的人脸朝向一致,比如都朝向左,或都朝向右,或都正视前方。

这个生成视频是极其慢的,作者给了加速的方法(感觉没太大差别),使用命令去执行,命令结尾加上-acc

视频驱动

python -m scripts.vid2vid --config ./configs/prompts/animation_facereenac.yaml -W 512 -H 512 -acc

打开configs/prompts文件夹,在animation_facereenac.yaml文件内修改图片或视频

音频驱动

python -m scripts.audio2vid --config ./configs/prompts/animation_audio.yaml -W 512 -H 512 -acc

打开configs/prompts文件夹,在animation_audio.yaml内修改图片或音频文件

以后如果有进一步的优化的话再搞一搞,电脑配置高的大佬可以去挑战一下试试。 作者:AI画师大阳 https://www.bilibili.com/read/cv36157034/ 出处:bilibili

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值