raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for LatentDiffusion:

#35
by donnychou - opened

我使用sd v2.3载入该模型,使用webui启动器启动后点击大模型 报错如下:

Loading VAE weights specified in settings: C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\models\VAE\animevae.pt
Applying xformers cross attention optimization.
VAE weights loaded.
Loading weights [f68b37e71f] from C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\models\Stable-diffusion\Taiyi-Stable-Diffusion-1B-Chinese-v0.1.ckpt
Failed to load checkpoint, restoring previous
Loading weights [7f96a1a9ca] from C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\models\Stable-diffusion\anything-v5-PrtRE.safetensors
Loading VAE weights specified in settings: C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\models\VAE\animevae.pt
Applying xformers cross attention optimization.
changing setting sd_model_checkpoint to Taiyi-Stable-Diffusion-1B-Chinese-v0.1.ckpt: RuntimeError
Traceback (most recent call last):
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\modules\shared.py", line 516, in set
self.data_labels[key].onchange()
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\webui.py", line 199, in
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\modules\sd_models.py", line 546, in reload_model_weights
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\modules\sd_models.py", line 288, in load_model_weights
model.load_state_dict(state_dict, strict=False)
File "C:\BaiduNetdiskDownload\sd-webui-aki\sd-webui-aki-v4.1\sd-webui-aki-v4.1\python\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 LatentDiffusion:
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
size mismatch for cond_stage_model.transformer.text_model.embeddings.position_ids: copying a param with shape torch.Size([1, 512]) from checkpoint, the shape in current model is torch.Size([1, 77]).

Sign up or log in to comment