Stable Diffusion 3 Automatic 1111: RuntimeError: Error(s) in loading state_dict for LatentDiffusion:

#74
by 1mmorta1 - opened

Downloaded SD3 on here. It was working fine on A1111, before I updated the Civitai Helper extension and restarted. Now, it wont change from working safetensors to SD3 and gives the below error.

Error:

Loading model sd3_medium.safetensors [cc236278d2] (2 out of 2)
Loading weights [cc236278d2] from D:\AI_Tech\AI_programs\stable-diffusion-webui\models\Stable-diffusion\sd3_medium.safetensors
Creating model from config: D:\AI_Tech\AI_programs\stable-diffusion-webui\configs\v1-inference.yaml
changing setting sd_model_checkpoint to sd3_medium.safetensors [cc236278d2]: RuntimeError
Traceback (most recent call last):
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\options.py", line 165, in set
option.onchange()
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\call_queue.py", line 13, in f
res = func(*args, **kwargs)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\initialize_util.py", line 181, in
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: sd_models.reload_model_weights()), call=False)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\sd_models.py", line 860, in reload_model_weights
sd_model = reuse_model_from_already_loaded(sd_model, checkpoint_info, timer)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\sd_models.py", line 826, in reuse_model_from_already_loaded
load_model(checkpoint_info)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\sd_models.py", line 748, in load_model
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\modules\sd_models.py", line 393, in load_model_weights
model.load_state_dict(state_dict, strict=False)
File "D:\AI_Tech\AI_programs\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:\AI_Tech\AI_programs\stable-diffusion-webui\modules\sd_disable_initialization.py", line 221, in load_state_dict
original(module, state_dict, strict=strict)
File "D:\AI_Tech\AI_programs\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for LatentDiffusion:
size mismatch for first_stage_model.encoder.conv_out.weight: copying a param with shape torch.Size([32, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([8, 512, 3, 3]).
size mismatch for first_stage_model.encoder.conv_out.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([8]).
size mismatch for first_stage_model.decoder.conv_in.weight: copying a param with shape torch.Size([512, 16, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 4, 3, 3]).

I hadn't changed any of my Webui settings before the update. Anyone have a clue?

1mmorta1 changed discussion title from Automatic 1111 error to Stable Diffusion 3 Automatic 1111 error
1mmorta1 changed discussion title from Stable Diffusion 3 Automatic 1111 error to Stable Diffusion 3 Automatic 1111: RuntimeError: Error(s) in loading state_dict for LatentDiffusion:

Same issue here. Tried to --reinstall-torch but to no avail

there seems to be an incompatibility with automatic1111 still needing to be resolved: https://education.civitai.com/quickstart-guide-to-stable-diffusion-3/#what-do-i-download-important-read-me

Sign up or log in to comment