# Connection error when try to Factory rebuild

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%3E%5C
**Category:** Spaces\
**Created:** [November 24, 2023, 5:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361 "2023-11-24T05:06:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![svjack](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/svjack/32/21324_2.png) [@svjack](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsvjack)%5C
**Post date:** [November 24, 2023, 5:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F1 "2023-11-24T05:06:42Z")

</div>

Hi, I try to rebuild some spaces, But it seems the container can not reach Hub by hf\_hub\_download,  
The build error spaces are:

> **[OpenBuddy Gradio - a Hugging Face Space by svjack](https://huggingface.co/spaces/svjack/OpenBuddy-Gradio)**
>
> Discover amazing ML apps made by the community

> **[svjack Space Documentation by Gradio - a Hugging Face Space by svjack](https://huggingface.co/spaces/svjack/svjack-space-doc)**
>
> Discover amazing ML apps made by the community

> **[Gpt Daliy Dialogue Chinese - a Hugging Face Space by svjack](https://huggingface.co/spaces/svjack/gpt-daliy-dialogue-chinese)**
>
> Discover amazing ML apps made by the community

> **[Extract Similar Chinese Span By English From Chinese - a Hugging Face Space...](https://huggingface.co/spaces/svjack/Extract-Similar-Chinese-Span-by-English-From-Chinese)**
>
> Discover amazing ML apps made by the community

Can someone help ? 😛🙏🙏🤭

---

<div class="post-metadata">

**Author:** ![Yntec](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yntec/32/27945_2.png) [@Yntec](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYntec)%5C
**Post date:** [November 24, 2023, 9:21am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F2 "2023-11-24T09:21:14Z")

</div>

No, there’s nothing users can do to resolve these errors.

My only advice is to keep trying, I just built a space and it’s sitting in the middle of a page surrounded by spaces with errors or stuck building.

My theory is that now an then a window of opportunity opens and a space builds, so if you hit it you get a running space.

You can check this page:

> **[Spaces - Hugging Face](https://huggingface.co/spaces?p=0&sort=modified)**
>
> Discover amazing ML apps made by the community

To see when building spaces are back to normal (when the problem is resolved you’ll see running spaces as opposed to stuck building ones and ones with errors like they are now).

---

<div class="post-metadata">

**Author:** ![svjack](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/svjack/32/21324_2.png) [@svjack](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsvjack)%5C
**Post date:** [November 24, 2023, 9:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F3 "2023-11-24T09:46:28Z")

</div>

Thank you, I find that many your models are deployed on text-to-image interface of huggingface’s inference api, how did you do that ? (to make them depolyed online)

---

<div class="post-metadata">

**Author:** ![Yntec](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yntec/32/27945_2.png) [@Yntec](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYntec)%5C
**Post date:** [November 26, 2023, 2:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F4 "2023-11-26T14:15:15Z")

</div>

Use a space like this one to convert a Stable Diffusion model to Diffusers:

> **[SD To Diffusers - a Hugging Face Space by Yntec](https://huggingface.co/spaces/Yntec/sd-to-diffusers)**
>
> Discover amazing ML apps made by the community

Create a new model, upload a checkpoint or a safetensors file to it, make sure it’s public, fill the data on that space (for v1 model types I recommend the pndm scheduler type, it’s the best unless the model suffers from coherence issues - I also recommend you to use a model that has been pruned already as no-ema, and to pick no-ema at the bottom, because extracting ema is not reliable and the resulting diffusers produce low quality outputs) and click Submit.

Afterwards it’ll get stuck at 10% for about 200 seconds, and then at 70% for about another 200, depending on the model, and then a PR will be created, click the link and click on merge at the bottom to convert to diffusers.

Finally (and this is a key step most people don’t do, and that’s why their diffusers don’t have an inference end point) you have to create a model card with this code as the minimum:

```auto
---
library_name: diffusers
pipeline_tag: text-to-image

---

```

Save it and it’ll now have an inference api.

---

<div class="post-metadata">

**Author:** ![svjack](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/svjack/32/21324_2.png) [@svjack](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsvjack)%5C
**Post date:** [November 27, 2023, 3:18am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F5 "2023-11-27T03:18:29Z")

</div>

Where is the api Params I can looked up ?

---

<div class="post-metadata">

**Author:** ![Yntec](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yntec/32/27945_2.png) [@Yntec](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYntec)%5C
**Post date:** [December 4, 2023, 3:21pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconnection-error-when-try-to-factory-rebuild%2F63361%2F6 "2023-12-04T15:21:45Z")

</div>

Click on Files and then click on app.py.
