# Getting an error while loading dreamshaper via diffusers

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-an-error-while-loading-dreamshaper-via-diffusers%2F55983%3E%5C
**Category:** Models\
**Created:** [September 22, 2023, 9:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-an-error-while-loading-dreamshaper-via-diffusers%2F55983 "2023-09-22T09:15:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![furkannabisumji](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@furkannabisumji](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffurkannabisumji)%5C
**Post date:** [September 22, 2023, 9:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-an-error-while-loading-dreamshaper-via-diffusers%2F55983%2F1 "2023-09-22T09:15:22Z")

</div>

INFO @@@@@ Starting Diffuzes API @@@@@  
INFO Text2Image Model: Lykon/DreamShaper  
INFO Text2Image Pipeline: Vanilla  
INFO Inpainting Model: None  
INFO Device: cuda  
INFO Output Path: None  
INFO Token Identifier:  
INFO Token Embeddings URL:  
INFO Loading x2img model…  
safety\_checker/model.safetensors not found  
The config attributes {‘addition\_embed\_type’: None, ‘addition\_embed\_type\_num\_heads’: 64, ‘encoder\_hid\_dim\_type’: None, ‘time\_embedding\_dim’: None} were passed to UNet2DConditionModel, but are not expected and will be ignored. Please verify your config.json configuration file.  
ERROR: Traceback (most recent call last):  
File “/genAI/venv/lib/python3.10/site-packages/starlette/routing.py”, line 671, in lifespan  
async with self.lifespan\_context(app):  
File “/genAI/venv/lib/python3.10/site-packages/starlette/routing.py”, line 566, in **aenter**  
await self.\_router.startup()  
File “/genAI/venv/lib/python3.10/site-packages/starlette/routing.py”, line 648, in startup  
await handler()  
File “/genAI/venv/lib/python3.10/site-packages/diffuzers/api/main.py”, line 46, in startup\_event  
app.state.x2img\_model = X2Image(  
File “”, line 9, in **init**  
File “/genAI/venv/lib/python3.10/site-packages/diffuzers/x2image.py”, line 72, in **post\_init**  
self.text2img\_pipeline = DiffusionPipeline.from\_pretrained(  
File “/genAI/venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline\_utils.py”, line 1009, in from\_pretrained  
loaded\_sub\_model = load\_sub\_model(  
File “/genAI/venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline\_utils.py”, line 444, in load\_sub\_model  
loaded\_sub\_model = load\_method(os.path.join(cached\_folder, name), \*\*loading\_kwargs)  
File “/genAI/venv/lib/python3.10/site-packages/diffusers/models/modeling\_utils.py”, line 561, in from\_pretrained  
raise ValueError(  
ValueError: Cannot load \<class ‘diffusers.models.autoencoder\_kl.AutoencoderKL’\> from /root/.cache/huggingface/hub/models–Lykon–DreamShaper/snapshots/da192fb823b14d306f52f9418b25923479e666ea/vae because the following keys are missing:  
decoder.mid\_block.attentions.0.query.weight, decoder.mid\_block.attentions.0.value.bias, decoder.mid\_block.attentions.0.key.bias, encoder.mid\_block.attentions.0.query.bias, decoder.mid\_block.attentions.0.proj\_attn.bias, encoder.mid\_block.attentions.0.value.weight, encoder.mid\_block.attentions.0.query.weight, decoder.mid\_block.attentions.0.query.bias, encoder.mid\_block.attentions.0.proj\_attn.weight, decoder.mid\_block.attentions.0.proj\_attn.weight, encoder.mid\_block.attentions.0.key.bias, encoder.mid\_block.attentions.0.key.weight, decoder.mid\_block.attentions.0.value.weight, encoder.mid\_block.attentions.0.proj\_attn.bias, decoder.mid\_block.attentions.0.key.weight, encoder.mid\_block.attentions.0.value.bias.  
Please make sure to pass `low_cpu_mem_usage=False` and `device_map=None` if you want to randomly initialize those weights or else make sure your checkpoint file is correct.

---

<div class="post-metadata">

**Author:** ![Lebaaz](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lebaaz/32/20423_2.png) [@Lebaaz](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLebaaz)%5C
**Post date:** [October 17, 2023, 6:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-an-error-while-loading-dreamshaper-via-diffusers%2F55983%2F2 "2023-10-17T18:56:14Z")

</div>

Did you fix it? I have the same problem. Would love to know.

---

<div class="post-metadata">

**Author:** ![furkannabisumji](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@furkannabisumji](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffurkannabisumji)%5C
**Post date:** [October 18, 2023, 10:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-an-error-while-loading-dreamshaper-via-diffusers%2F55983%2F3 "2023-10-18T10:46:13Z")

</div>

No, I used automatic1111.
