AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.83k stars 26.5k forks source link

[Bug]: #12014

Closed ChenCheng2Cs closed 1 year ago

ChenCheng2Cs commented 1 year ago

Is there an existing issue for this?

What happened?

After updates to latest version of sd webui, loading of sdxl model will show error

Loading weights [1f69731261] from stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_0.9.safetensors Creating model from config: stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml ERROR:root:Model config for ViT-bigG-14 not found; available models ['mt5-base-ViT-B-32', 'mt5-xl-ViT-H-14', 'RN50', 'RN50-quickgelu', 'RN50x4', 'RN50x16', 'RN50x64', 'RN101', 'RN101-quickgelu', 'roberta-ViT-B-32', 'timm-convnext_base', 'timm-convnext_large', 'timm-convnext_xlarge', 'timm-efficientnetv2_rw_s', 'timm-resnetaa50d', 'timm-swin_base_patch4_window7_224', 'timm-vit_medium_patch16_gap_256', 'timm-vit_relpos_medium_patch16_cls_224', 'ViT-B-16', 'ViT-B-16-plus', 'ViT-B-16-plus-240', 'ViT-B-32', 'ViT-B-32-plus-256', 'ViT-B-32-quickgelu', 'ViT-e-14', 'ViT-g-14', 'ViT-G-14', 'ViT-H-14', 'ViT-H-16', 'ViT-L-14', 'ViT-L-14-280', 'ViT-L-14-336', 'ViT-L-16', 'ViT-L-16-320', 'ViT-M-16', 'ViT-M-16-alt', 'ViT-M-32', 'ViT-M-32-alt', 'ViT-S-16', 'ViT-S-16-alt', 'ViT-S-32', 'ViT-S-32-alt', 'xlm-roberta-base-ViT-B-32', 'xlm-roberta-large-ViT-H-14'].

Put in short, model config for Vit-bigG-14 is missing.

Steps to reproduce the problem

  1. Update sd webui to latest version 1.5
  2. git clone sd genrative models repo to repository
  3. put sdxl base and refiner into models/stable-diffusion
  4. run sd webui and load sdxl base models

What should have happened?

models load without any errors

Version or Commit where the problem happens

Version v1.5.0

What Python version are you running on ?

None

What platforms do you use to access the UI ?

No response

What device are you running WebUI on?

No response

Cross attention optimization

Automatic

What browsers do you use to access the UI ?

No response

Command Line Arguments

--api --listen

List of extensions

controlnet

Console logs

ERROR:root:Model config for ViT-bigG-14 not found; available models ['mt5-base-ViT-B-32', 'mt5-xl-ViT-H-14', 'RN50', 'RN50-quickgelu', 'RN50x4', 'RN50x16', 'RN50x64', 'RN101', 'RN101-quickgelu', 'roberta-ViT-B-32', 'timm-convnext_base', 'timm-convnext_large', 'timm-convnext_xlarge', 'timm-efficientnetv2_rw_s', 'timm-resnetaa50d', 'timm-swin_base_patch4_window7_224', 'timm-vit_medium_patch16_gap_256', 'timm-vit_relpos_medium_patch16_cls_224', 'ViT-B-16', 'ViT-B-16-plus', 'ViT-B-16-plus-240', 'ViT-B-32', 'ViT-B-32-plus-256', 'ViT-B-32-quickgelu', 'ViT-e-14', 'ViT-g-14', 'ViT-G-14', 'ViT-H-14', 'ViT-H-16', 'ViT-L-14', 'ViT-L-14-280', 'ViT-L-14-336', 'ViT-L-16', 'ViT-L-16-320', 'ViT-M-16', 'ViT-M-16-alt', 'ViT-M-32', 'ViT-M-32-alt', 'ViT-S-16', 'ViT-S-16-alt', 'ViT-S-32', 'ViT-S-32-alt', 'xlm-roberta-base-ViT-B-32', 'xlm-roberta-large-ViT-H-14'].
Failed to create model quickly; will retry using slow method.
Model config for ViT-bigG-14 not found;ERROR:root:Model config for ViT-bigG-14 not found; available models ['mt5-base-ViT-B-32', 'mt5-xl-ViT-H-14', 'RN50', 'RN50-quickgelu', 'RN50x4', 'RN50x16', 'RN50x64', 'RN101', 'RN101-quickgelu', 'roberta-ViT-B-32', 'timm-convnext_base', 'timm-convnext_large', 'timm-convnext_xlarge', 'timm-efficientnetv2_rw_s', 'timm-resnetaa50d', 'timm-swin_base_patch4_window7_224', 'timm-vit_medium_patch16_gap_256', 'timm-vit_relpos_medium_patch16_cls_224', 'ViT-B-16', 'ViT-B-16-plus', 'ViT-B-16-plus-240', 'ViT-B-32', 'ViT-B-32-plus-256', 'ViT-B-32-quickgelu', 'ViT-e-14', 'ViT-g-14', 'ViT-G-14', 'ViT-H-14', 'ViT-H-16', 'ViT-L-14', 'ViT-L-14-280', 'ViT-L-14-336', 'ViT-L-16', 'ViT-L-16-320', 'ViT-M-16', 'ViT-M-16-alt', 'ViT-M-32', 'ViT-M-32-alt', 'ViT-S-16', 'ViT-S-16-alt', 'ViT-S-32', 'ViT-S-32-alt', 'xlm-roberta-base-ViT-B-32', 'xlm-roberta-large-ViT-H-14'].
changing setting sd_model_checkpoint to sd_xl_base_0.9.safetensors [1f69731261]: RuntimeError
Traceback (most recent call last):
  File "/home/zhaop-l/code/stable-diffusion-webui/modules/shared.py", line 633, in set
    self.data_labels[key].onchange()
  File "/home/zhaop-l/code/stable-diffusion-webui/modules/call_queue.py", line 14, in f
    res = func(*args, **kwargs)
  File "/home/zhaop-l/code/stable-diffusion-webui/webui.py", line 238, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
  File "/home/zhaop-l/code/stable-diffusion-webui/modules/sd_models.py", line 578, in reload_model_weights
    load_model(checkpoint_info, already_loaded_state_dict=state_dict)
  File "/home/zhaop-l/code/stable-diffusion-webui/modules/sd_models.py", line 504, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "/home/zhaop-l/code/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 "/home/zhaop-l/code/stable-diffusion-webui/repositories/generative-models/sgm/models/diffusion.py", line 61, in __init__
    self.conditioner = instantiate_from_config(
  File "/home/zhaop-l/code/stable-diffusion-webui/repositories/generative-models/sgm/util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/home/zhaop-l/code/stable-diffusion-webui/repositories/generative-models/sgm/modules/encoders/modules.py", line 88, in __init__
    embedder = instantiate_from_config(embconfig)
  File "/home/zhaop-l/code/stable-diffusion-webui/repositories/generative-models/sgm/util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/home/zhaop-l/code/stable-diffusion-webui/repositories/generative-models/sgm/modules/encoders/modules.py", line 428, in __init__
    model, _, _ = open_clip.create_model_and_transforms(
  File "/home/zhaop-l/anaconda3/envs/webui/lib/python3.10/site-packages/open_clip/factory.py", line 201, in create_model_and_transforms
    model = create_model(
  File "/home/zhaop-l/anaconda3/envs/webui/lib/python3.10/site-packages/open_clip/factory.py", line 131, in create_model
    raise RuntimeError(f'Model config for {model_name} not found.')
RuntimeError: Model config for ViT-bigG-14 not found.

Additional information

No response

JERRYZFC commented 1 year ago

just check if you had added '' --skip-instal '' in your args to start webui, if do remove it , open_clip_torch-2.20.0 will has the config for you

in one word update open_clip and try if the issue exists

BigZampano commented 1 year ago

just check if you had added '' --skip-instal '' in your args to start webui...

Thanks so much...! I hab the same problem and after removing --skip-install in my arguments everything works fine...!

ahsan-malik commented 1 year ago

I'm facing the same problem. I'm using the --api Models based on SD1.5 works well, but when I use SDXL based models then it give me the same error. But on webui all the models(sd1.5 & sdxl) are working.

ZJsheep commented 11 months ago

just check if you had added '' --skip-instal '' in your args to start webui, if do remove it , open_clip_torch-2.20.0 will has the config for you

in one word update open_clip and try if the issue exists

Actually when I upgraded open_clip_torch, many of the loras become broken, any idea on this, please?