lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.55k stars 839 forks source link

Running sd_xl_refiner_1.0_0.9vae model encounter "AssertionError: You do not have CLIP state dict!" #1866

Open shiboyang opened 2 months ago

shiboyang commented 2 months ago

My running logs:

Model selected: {'checkpoint_info': {'filename': '/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/models/Stable-diffusion/sd_xl_refiner_1.0_0.9vae.safetensors', 'hash': '1e06ed13'}, 'additional_modules': ['/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/models/text_encoder/clip_l.safetensors'], 'unet_storage_dtype': None}
Using online LoRAs in FP16: False
Loading Model: {'checkpoint_info': {'filename': '/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/models/Stable-diffusion/sd_xl_refiner_1.0_0.9vae.safetensors', 'hash': '1e06ed13'}, 'additional_modules': ['/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/models/text_encoder/clip_l.safetensors'], 'unet_storage_dtype': None}
StateDict Keys: {'unet': 1220, 'vae': 248, 'text_encoder': 518, 'ignore': 0}
Skipped: text_encoder = None.None
Traceback (most recent call last):
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/modules_forge/main_thread.py", line 30, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/modules/txt2img.py", line 121, in txt2img_function
    processed = processing.process_images(p)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/modules/processing.py", line 799, in process_images
    p.sd_model, just_reloaded = forge_model_reload()
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/modules/sd_models.py", line 494, in forge_model_reload
    sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/backend/loader.py", line 283, in forge_loader
    component = load_huggingface_component(estimated_config, component_name, lib_name, cls_name, local_path, component_sd)
  File "/home/shiboyang/workspaces/apps/stable-diffusion-webui-forge/backend/loader.py", line 59, in load_huggingface_component
    assert isinstance(state_dict, dict) and len(state_dict) > 16, 'You do not have CLIP state dict!'
AssertionError: You do not have CLIP state dict!
You do not have CLIP state dict!

However if i useing the sd_xl_base_1.0_0.9vae model which can work. image Even though i selected the clip_l model in the vae mutilselect box still not work. image

mrcomac commented 1 month ago

+1