17 NansException: Atensor with al NaNs was produced inThiscouldbe eitherbecause there's not enough precisionUnetrepresent the picture. or becausevour video card does not supporthalf type.

创建于 2024-02-02 / 766
字体: [默认] [大] [更大] 收藏文档

错误提示关键字:

NansException: Atensor with al NaNs was produced inThiscouldbe eitherbecause there's not enough precisionUnetrepresent the picture. or becausevour video card does not supporthalf type. Try setting the"Upcast cross attention Laver toloat32" option in Settings > Stable Diffusion or using the--no-halfcommandline to fix this. Use--disable-nan-check commandline argument to disable this check.

 

控制台输出:

descript

 

该错误可能的原因:

这个报错很多人第一时间给出建议是按照提示,加一个关闭半精度的参数或者设置关闭半精度。

但是这样处理之后,虽然不报错了,但只能出黑图。

根本原因其实是使用的大模型要求与你的显卡不符。(该说法存疑)

 

【扩展信息】

有人指出,这是经典的黑图问题,分为两类,unet黑图或者vae黑图,报错不同,用启动器自带的疑难解答就可以扫出来。

问题的根源是提示词\unet\vae\分辨率\种子这个序列刚好匹配上了一个无法表示的图,unet或者vae宕机,就出了黑图。

 

解决方案:

A 切换其他大模型。

B 升级更好的显卡。(存疑)

C 更改提示词\unet\vae\分辨率(宽高)\种子(seed)。

 

【附加信息】

扩展信息来自 落辰星:

descript

 


2 人点赞过