Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run Automatic1111 WebUI with SDXL 1.0 #559

Closed
2 tasks done
mashb1t opened this issue Jul 27, 2023 · 1 comment · Fixed by GuillaumePugnet/stable-diffusion-webui-docker#4
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@mashb1t
Copy link
Contributor

mashb1t commented Jul 27, 2023

Has this issue been opened before?

  • It is not in the FAQ, I checked.
  • It is not in the issues, I searched.

Describe the bug

It's not possible to load SDXL V1 with the latest release and after building the latest image.

Which UI

auto

Hardware / Software

  • OS: Windows 10
  • OS version: 22H2 (Build 19045.3208)
  • WSL version (if applicable): version 2
  • Docker Version: Docker version 24.0.2, build cb74dfc
  • Docker compose version: Docker Compose version v2.19.1
  • Repo version: latest, 09a0f11
  • RAM: 128GB
  • GPU/VRAM: NVidia RTX 4090, 24GB VRAM

Steps to Reproduce

  1. Download SDXL safetensor model from https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/main
  2. load model
  3. see error below

Additional context

2023-07-27 17:59:31 changing setting sd_model_checkpoint to base_sd/sd_xl_base_1.0.safetensors: RuntimeError
2023-07-27 17:59:31 Traceback (most recent call last):
2023-07-27 17:59:31 File "/stable-diffusion-webui/modules/shared.py", line 605, in set
2023-07-27 17:59:31 self.data_labels[key].onchange()
2023-07-27 17:59:31 File "/stable-diffusion-webui/modules/call_queue.py", line 13, in f
2023-07-27 17:59:31 res = func(*args, **kwargs)
2023-07-27 17:59:31 File "/stable-diffusion-webui/webui.py", line 226, in
2023-07-27 17:59:31 shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
2023-07-27 17:59:31 File "/stable-diffusion-webui/modules/sd_models.py", line 556, in reload_model_weights
2023-07-27 17:59:31 load_model_weights(sd_model, checkpoint_info, state_dict, timer)
2023-07-27 17:59:31 File "/stable-diffusion-webui/modules/sd_models.py", line 286, in load_model_weights
2023-07-27 17:59:31 model.load_state_dict(state_dict, strict=False)
2023-07-27 17:59:31 File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
2023-07-27 17:59:31 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
2023-07-27 17:59:31 RuntimeError: Error(s) in loading state_dict for LatentDiffusion:
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.4.1.proj_in.weight: copying a param with shape torch.Size([640, 640]) from checkpoint, the shape in current model is torch.Size([640, 640, 1, 1]).
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.4.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 2048]) from checkpoint, the shape in current model is torch.Size([640, 768]).
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.4.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 2048]) from checkpoint, the shape in current model is torch.Size([640, 768]).
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.4.1.proj_out.weight: copying a param with shape torch.Size([640, 640]) from checkpoint, the shape in current model is torch.Size([640, 640, 1, 1]).
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.5.1.proj_in.weight: copying a param with shape torch.Size([640, 640]) from checkpoint, the shape in current model is torch.Size([640, 640, 1, 1]).
2023-07-27 17:59:31 size mismatch for model.diffusion_model.input_blocks.5.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 2048]) from checkpoint, the shape in current model is torch.Size([640, 768]).

...

@mashb1t mashb1t added the bug Something isn't working label Jul 27, 2023
@mashb1t mashb1t changed the title Can't run WebUI with SDXL 1.0 Can't run Automatic1111 WebUI with SDXL 1.0 Jul 27, 2023
mashb1t added a commit to mashb1t/stable-diffusion-webui-docker that referenced this issue Jul 27, 2023
@rahul1201dtu
Copy link

Facing this issue please help

Traceback (most recent call last):
File "d:\anaconda3\envs\tf\lib\threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File "d:\anaconda3\envs\tf\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "d:\anaconda3\envs\tf\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "D:\stable-diffusion-webui\modules\initialize.py", line 147, in load_model
shared.sd_model # noqa: B018
File "D:\stable-diffusion-webui\modules\shared_items.py", line 110, in sd_model
return modules.sd_models.model_data.get_sd_model()
File "D:\stable-diffusion-webui\modules\sd_models.py", line 499, in get_sd_model
load_model()
File "D:\stable-diffusion-webui\modules\sd_models.py", line 626, in load_model
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
File "D:\stable-diffusion-webui\modules\sd_models.py", line 353, in load_model_weights
model.load_state_dict(state_dict, strict=False)
File "D:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 223, in
module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs))
File "D:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 221, in load_state_dict
original(module, state_dict, strict=strict)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for DiffusionEngine:
size mismatch for model.diffusion_model.out.2.weight: copying a param with shape torch.Size([4, 320, 3, 3]) from checkpoint, the shape in current model is torch.Size([9, 320, 3, 3]).
size mismatch for model.diffusion_model.out.2.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([9]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants