Stable Diffusion 使用新添加的 VAE 模型后出现报错RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0!

今天在 Stable Diffusion 使用时新添加了一个.safetensors文件的 VAE 模型,但是选择后不能加载,自动返回以前的 VAE 模型,再次运行生成图片时出现了以下报错:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)。

无论怎么做都不能生成图片了,无奈之下只有把这个 VAE 模型删除,并重新启动 Stable Diffusion 才能正常使用。

网上说的在启动文件 bat 中放置“–disable-safe-unpickle”命令也不行。

不知道是不是模型问题,而且这个 VAE 模型很大,也许不该放在 VAE 下,应该放在大模型文件下。

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

评论

发表回复

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