找回密码
 立即注册
查看: 1485|回复: 5

[StableDiffusion] 添加了ChilloutMix模型后,报错

[复制链接]

5

主题

62

回帖

23

积分

新手上路

积分
23
发表于 2023-5-3 18:31:59 | 显示全部楼层 |阅读模式
安装完stable diffusion并成功启动
在“..\models\Stable-diffusion\”中放入“chilloutmixss_xss10.safetensors”后,重新启动webui-user.bat

结果如下报错,请问该如何解决?

venv "D:\AllProjects\GitHubProjects\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 72cd27a13587c9579942577e9e3880778be195f6
Installing requirements
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
==============================================================================
You are running torch 1.13.1+cu117.
The program is tested to work with torch 2.0.0.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Loading weights [7dc213110f] from D:\AllProjects\GitHubProjects\stable-diffusion-webui\models\Stable-diffusion\chilloutmixss_xss10.safetensors
Creating model from config: D:\AllProjects\GitHubProjects\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Error verifying pickled file from C:\Users\hp_zerolan/.cache\huggingface\hub\models--openai--clip-vit-large-patch14\snapshots\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin:
Traceback (most recent call last):
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.


Failed to create model quickly; will retry using slow method.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Error verifying pickled file from C:\Users\hp_zerolan/.cache\huggingface\hub\models--openai--clip-vit-large-patch14\snapshots\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin:
Traceback (most recent call last):
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'


The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.


loading stable diffusion model: AttributeError
Traceback (most recent call last):
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\webui.py", line 195, in initialize
    modules.sd_models.load_model()
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\modules\sd_models.py", line 447, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 563, in __init__
    self.instantiate_cond_stage(cond_stage_config)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 630, in instantiate_cond_stage
    model = instantiate_from_config(config)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\encoders\modules.py", line 104, in __init__
    self.transformer = CLIPTextModel.from_pretrained(version)
  File "D:\AllProjects\GitHubProjects\stable-diffusion-webui\venv\lib\site-packages\transformers\modeling_utils.py", line 2258, in from_pretrained
    loaded_state_dict_keys = [k for k in state_dict.keys()]
AttributeError: 'NoneType' object has no attribute 'keys'


Stable diffusion model failed to load, exiting
请按任意键继续. . .

68

主题

382

回帖

1047

积分

管理员

积分
1047

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2023-5-3 18:38:50 | 显示全部楼层
从报错信息中可以看到,这个错误和模型没有任何关系,这是torch版本不兼容报错,你是不是pytorch_model.bin这个文件?

点评

加入ChilloutMix模型后,确实提示下载“pytorch_model.bin”。但是已经下完了,下了好久。然后我把ChilloutMix新建个文件夹丢进去就能启动(“..\models\Stable-diffusion\新建文件夹”),放回“..\models\Stable-d  详情 回复 发表于 2023-5-3 19:33

5

主题

62

回帖

23

积分

新手上路

积分
23
 楼主| 发表于 2023-5-3 19:33:06 | 显示全部楼层
PhiltreX 发表于 2023-5-3 18:38
从报错信息中可以看到,这个错误和模型没有任何关系,这是torch版本不兼容报错,你是不是pytorch_model.bin ...

加入ChilloutMix模型后,确实提示下载“pytorch_model.bin”。但是已经下完了,下了好久。然后我把ChilloutMix新建个文件夹丢进去就能启动(“..\models\Stable-diffusion\新建文件夹”),放回“..\models\Stable-diffusion”就报错

5

主题

62

回帖

23

积分

新手上路

积分
23
 楼主| 发表于 2023-5-3 19:44:24 | 显示全部楼层
不对。。我发现是个概率性问题?有时会有时又不报错。。。。

68

主题

382

回帖

1047

积分

管理员

积分
1047

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2023-5-3 19:57:14 | 显示全部楼层
hp_zerolan 发表于 2023-5-3 19:44
不对。。我发现是个概率性问题?有时会有时又不报错。。。。

我知道了,可能因为这个模型需要附加的VAE文件?

68

主题

382

回帖

1047

积分

管理员

积分
1047

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2023-5-3 19:59:39 | 显示全部楼层
可能因为pytorch_model文件需要PyTorch来加载,但是因为版本不一致,所以才会报错,建议尝试关闭自动加载VAE文件选项。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|openAI维基百科论坛 ( 京ICP备2021019752号-5|京公网安备 11010502051430号 )

GMT+8, 2024-11-24 00:37 , Processed in 0.107433 second(s), 34 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表