# Importing community made models and pipeline elements that don't have the diffusers format

**URL:** <https://discuss.huggingface.co/t/importing-community-made-models-and-pipeline-elements-that-dont-have-the-diffusers-format/38900>\
**Category:** 🧨 Diffusers\
**Created:** [May 6, 2023, 3:51pm UTC](https://discuss.huggingface.co/t/importing-community-made-models-and-pipeline-elements-that-dont-have-the-diffusers-format/38900 "2023-05-06T15:51:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragonjinx](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Dragonjinx](https://discuss.huggingface.co/u/Dragonjinx)\
**Post date:** [May 6, 2023, 3:51pm UTC](https://discuss.huggingface.co/t/importing-community-made-models-and-pipeline-elements-that-dont-have-the-diffusers-format/38900/1 "2023-05-06T15:51:14Z")

</div>

### Objective

I am currently following the using diffusers section on the documentation page and have come to a point where I can swap out pipeline elements from valid diffusers libraries hosted at hugging face. I can either load the model from the diffusers pipeline and get the components I want, or download and replace the relevant folder manually from the repository. Expanding this, I wanted to try to use community-made stable diffusion models on websites like Civitai, as well as custom community components.

As an example, I would like to use this model checkpoint that is available in a safetensor format:  
`https://civitai.com/models/7371/rev-animated`

With the following vae(s):  
`https://huggingface.co/WarriorMama777/OrangeMixs/tree/main/VAEs`

### Problem

I have found that cloning the `stable diffusion-v1-5` repository and replacing the `.safetensors` and `.ckpts` with the revAnimated '.safetensor` works to run the model.

However, the community vae(s) come either in:

- `.safetensor`
- `.vae.pt`
- `.ckpt`

which is not compatible with the `diffusers.models.AutoencoderKL` as it expects a `config.yaml` and ` diffusion_pytorch_model.bin` file. I would like to try to convert these files into a format usable by the diffusers library.

### Attempted Solutions

For the conversion I have tried following the instructions on this issue:  
`https://github.com/huggingface/diffusers/issues/1928`

This leads me to the following spaces:  
`https://huggingface.co/spaces/camenduru/converter`  
`https://huggingface.co/spaces/diffusers/sd-to-diffusers`

The first page gets stuck in a preparing space loop:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/4/4c553c51b15599900a3ff3f7c020f2b50f9a3604.png)

The other page has a runtime error on load:

```auto
Runtime error
Traceback (most recent call last):
  File "app.py", line 3, in <module>
    from convert import convert
  File "/home/user/app/convert.py", line 74, in <module>
    def convert(token: str, model_id: str, filename: str, model_type: str, sample_size: int = 512, scheduler_type: str = "pndm", extract_ema: bool = True, progress=gr.Progress()):
AttributeError: module 'gradio' has no attribute 'Progress'

```

### Queries

- Is there a way I can do the conversion locally?
- If yes, does the resulting conversion give me a stable diffusion model or just the vae components?
- Is there a way to use these components with the diffuser library without the need for conversions?

I am aware that these work out of the box with a custom web UI like Automatic 1111, however, my objective is to better learn the diffusers library.

### Thank you for taking the time to go through my topic 😄

---

<div class="post-metadata">

**Author:** ![williamberman](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/williamberman/32/14112_2.png) [@williamberman](https://discuss.huggingface.co/u/williamberman)\
**Post date:** [May 22, 2023, 6:21pm UTC](https://discuss.huggingface.co/t/importing-community-made-models-and-pipeline-elements-that-dont-have-the-diffusers-format/38900/2 "2023-05-22T18:21:24Z")

</div>

hey @Dragonjinx we have conversion scripts for stable diffusion here [diffusers/convert\_original\_stable\_diffusion\_to\_diffusers.py at main · huggingface/diffusers · GitHub](https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py)

Note that we can’t support arbitrary conversions for arbitrary models and I don’t think we have any recommended vae conversion scripts. You might have to write the code yourself 🙂
