函数计算FC图生图 这个报错怎么解决?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.
这个报错是由于在Unet中生成了一个所有元素都是NaN的张量。这可能是由于图片精度不足,或者您的显卡不支持半精度类型(half type)。您可以尝试以下方法解决:
在设置中将“Upcast cross attention layer to float32”选项设置为True。具体操作如下:
使用命令行参数--no-half
来禁用半精度类型。具体操作如下:
--no-half
参数。使用命令行参数--disable-nan-check
来禁用NaN检查。具体操作如下:
--disable-nan-check
参数。版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。