Stable Diffusion 生成时报错解决方法:ValueError: Query/Key/Value should all have the same dtype query.dtype: torch.float32 key.dtype : torch.float32 value.dtype: torch.float16

Stable Diffusion 生成时最常见的两个错误,一个是前面一篇文章介绍的:Stable Diffusion 生成出现错误:NansException: A tensor with all NaNs was produced in Une,解决方法,用前面这篇文章介绍的方法勾选:将交叉关注层向上投射到float32,保存并重载UI,运行生成图像时,又可能会出现另外一个报错:ValueError: Query/Key/Value should all have the same dtype query.dtype: torch.float32 key.dtype : torch.float32 value.dtype: torch.float16,下面是解决方法:

打开启动文件:webui-user.bat,在“set COMMANDLINE_ARGS=”一栏加上:–no-half,保存并重启webui,问题解决。

如果还有报错,可以再加上:–precision full 与 :–no-half 搭配使用。

相关主题:stable diffusion 扩展报错解决方法

点击直达: AI 图片免费生成工具

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注