# Loading into pipeline from single file

**URL:** <https://discuss.huggingface.co/t/loading-into-pipeline-from-single-file/105138>\
**Category:** 🧨 Diffusers\
**Created:** [September 3, 2024, 4:22pm UTC](https://discuss.huggingface.co/t/loading-into-pipeline-from-single-file/105138 "2024-09-03T16:22:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrStelk](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@MrStelk](https://discuss.huggingface.co/u/MrStelk)\
**Post date:** [September 3, 2024, 4:22pm UTC](https://discuss.huggingface.co/t/loading-into-pipeline-from-single-file/105138/1 "2024-09-03T16:22:03Z")

</div>

Hello! I am new to diffusers and when I try to use the from\_single\_file() method for the UNet2DConditional model, I was getting errors:

`unet = UNet2DConditionModel.from_single_file( "https://huggingface.co/CompVis/stable-diffusion-v1-4/unet/diffusion_pytorch_model.safetensors")`  
I tried it with the .bin file and also using a local file after downloading.  
All of them give the same error.  
`SingleFileComponentError: Failed to load UNet2DConditionModel. Weights for this component appear to be missing in the checkpoint.`

Can someone explain why this is happening and what is expected?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 4, 2024, 6:50am UTC](https://discuss.huggingface.co/t/loading-into-pipeline-from-single-file/105138/2 "2024-09-04T06:50:31Z")

</div>

> **[@dn6 on Hugging Face: "Sharing for anyone using Diffusers \`from\_single\_file\`...](https://huggingface.co/posts/dn6/357701279407928)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

There is currently a highly politicized, perhaps, but technically very shabby problem with **from\_single\_file**.  
It might work if you download the config from the appropriate repo and set it to reference local.

I have some stored in my cache, so I haven’t verified it yet.
