stable-diffusion-webui出现NansException: A tensor with all NaNs was produced in Unet

stable-diffusion-webui出现NansException: A tensor with all NaNs was produced in Unet

    正在检查是否收录...

环境:秋叶大佬的stable-diffusion-webui启动器
操作系统:windows11
问题描述,当我更新了webui的版本以及更新了一些插件后跑xl或者批量处理图生图时出现如下错误:
NansException: A tensor with all NaNs was produced in Unet. This could be either because there’s not enough precision to represent the picture, or because your video card does not support half type. Try setting the “Upcast cross attention layer to float32” option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check

解决办法:
打开stable-diffusion-webui的根目录,然后打开launch.py,修改如下:

def main(): import sys #添加这行 sys.argv.append("--no-half") # 添加这行 if args.dump_sysinfo: filename = launch_utils.dump_sysinfo() print(f"Sysinfo saved as {filename}. Exiting...") exit(0) launch_utils.startup_timer.record("initial startup") with launch_utils.startup_timer.subcategory("prepare environment"): if not args.skip_prepare_environment: prepare_environment() if args.test_server: configure_for_tests() start() if __name__ == "__main__": main() 

添加如上两行代码,然后重启stable-diffusion-webui,就解决相关的问题了;

webuidiffusionweb图生图stable diffusion批量处理appwindowside操作系统fix
  • 本文作者:李琛
  • 本文链接: https://wapzz.net/post-17325.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.3W+
5
0
1
WAP站长官方

Llama模型家族之拒绝抽样(Rejection Sampling)(二)均匀分布简介

上一篇

这可能是最强AI文生图工具:Stable Diffusion 3 超详细测试

下一篇
  • 复制图片
按住ctrl可打开默认菜单