在Stable Diffusion WebUI中安装SadTalker插件时几种错误提示的处理方法

SD中的插件一般安装比较简单,但也有一些插件安装会比较难。比如我在安装SadTalker时,就遇到很多问题,一度放弃了,后来查了一些网上攻略,自己也反复查看日志,终于解决,不吐不快。

一、在Stable Diffusion webui中安装SadTalker插件后,重启Stable Diffusion WebUI,在界面中没有出现SadTalker标签。

查绘世启动器中的运行提示,在运行到SadTalker插件时,系统出现很多错误提示,某个文件 某行代码有什么问题之类,最后为:

SadTalker module 'numpy' has no attribute 'complex'.

大意是说complex在numpy.py某个版本会已取消,可以退回以前版本之类。

退回原来的版本容易,但其他一些插件又会因为numpy.py版本过低引发新的问题。因此,解决方法是:

经过修改后,再次启动WebUI,终于能看到SadTalker标签了,选择图像,选择声音文件,调整参数,生成,程序终于欢快地跑起来了。

且慢,

二、插件运行过程中,前端视频生成框中提示Error(错误),过程中止。

WHY?是声音文件太长?格式不标准?在扩展文件夹中找到示例声音文件,也不行。查看控制台中输出的日志,显示:

File "D:/sd/sd-webui-aki-v4.1/extensions/SadTalker/src/face3d/util/my_awing_arch.py", line 18, in calculate_points

preds = preds.astype(np.float, copy=False)

File "D:/sd/sd-webui-aki-v4.1/python/Lib\site-packages/numpy/init.py", line 324, in getattr

raise AttributeError(former_attrs[attr])

AttributeError: module 'numpy' has no attribute 'float'.

`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.

The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

大意是说程序使用了 numpy 包中不存在的属性 float,np.float 是一个过期的别名。

还是才能毛病,numpy.py版本过低引发的问题。解决方法是:

1、找到图中位置的两个文件(注意保留副本)

2、将my_awing_arch.py中的第18行

preds = preds.astype(np.float, copy=False)

改为

preds = preds.astype(float, copy=False)
复制代码
如下图:

3、将preprocess.py中的101行

trans_params = np.array([w0, h0, s, t[0], t[1]])
复制代码
改为:
trans_params = np.array([w0, h0, s, t[0][0], t[1][0]])

如下图:

再次运行SadTalker,终于成功了。

视频区有试验作品:邓丽君小姐播新闻,赫本小姐播音《三峡》

极域电子教室座位表程序下载链接:链接:https://pan.baidu.com/s/1X0WUTtXmr1EhFg9CNgoIKA?pwd=odvs

提取码:odvs

考试指令系统下载链接:https://pan.baidu.com/s/11x9fS1gUEPCd6w15KHCxSw?pwd=zvw3

提取码:zvw3

照片插入电子表格程序链接:https://pan.baidu.com/s/1dvW5q9G53prkUDVcO6uffA?pwd=w3jp

提取码:w3jp

相关推荐
春末的南方城市4 小时前
新个性化时尚解决方案!Prompt2Fashion:自动生成多风格、类型时尚图像数据集。
人工智能·计算机视觉·stable diffusion·aigc·图像生成
肖遥Janic7 小时前
Stable Diffusion绘画 | 签名、字体、Logo设计
人工智能·ai·ai作画·stable diffusion
肖遥Janic1 天前
Stable Diffusion绘画 | 插件-Deforum:动态视频生成(终篇)
人工智能·ai·ai作画·stable diffusion
许野平1 天前
Stable Diffusion 常用大模型及其特点
人工智能·stable diffusion
肖遥Janic1 天前
Stable Diffusion绘画 | 来训练属于自己的模型:LoRA模型验收
人工智能·ai·ai作画·stable diffusion
肖遥Janic1 天前
Stable Diffusion绘画 | 如何做到不同动作表情,人物角色保持一致性(下篇)
ai·ai作画·stable diffusion
肖遥Janic2 天前
Stable Diffusion绘画 | 插件-Deforum:动态视频生成(中篇)
人工智能·ai·ai作画·stable diffusion·音视频
AIGC安琪3 天前
[ComfyUI]Flux:开源可商用F1!Apache2开源OpenFLUX1模型,已去蒸馏可微调
人工智能·stable diffusion·开源·aigc·midjourney·ai绘画·flux