# Serverless Inference API error on new model

**URL:** <https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752>\
**Category:** Inference Endpoints on the Hub\
**Created:** [September 7, 2024, 6:59am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752 "2024-09-07T06:59:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saripudin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/saripudin/32/30416_2.png) [@Saripudin](https://discuss.huggingface.co/u/Saripudin)\
**Post date:** [September 7, 2024, 6:59am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/1 "2024-09-07T06:59:05Z")

</div>

When I tested the Serverless Inference API with my new model, I encountered the following error:

```auto
{'error': "We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like Saripudin/autotrain-model-datasaur-ZDAzZTc5NmI-NGJmYmVlOWU is not the path to a directory containing a file named config.json.\nCheckout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'."}

```

Does this mean that Hugging Face has now limited their Serverless API usage?

---

<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 7, 2024, 9:33am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/2 "2024-09-07T09:33:53Z")

</div>

Currently, HF’s Serverless Inference API is in the midst of a specification change and a massive error coming at the same time.  
One of the errors has been fixed.

> [@Inference API turned off ? Why?](https://discuss.huggingface.co/t/inference-api-turned-off-why/97126):
>
> Whay the inference API are turned off ?

> **[@John6666 on Hugging Face: "@victor Sorry for the repetitiveness.

I'm not...](https://huggingface.co/posts/John6666/191046582909567)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **[@victor on Hugging Face: "🙋 Calling all Hugging Face users! We want to hear...](https://huggingface.co/posts/victor/964839563451127)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![Saripudin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/saripudin/32/30416_2.png) [@Saripudin](https://discuss.huggingface.co/u/Saripudin)\
**Post date:** [September 7, 2024, 1:47pm UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/3 "2024-09-07T13:47:05Z")

</div>

Thank you @John6666

I’ve tested it and it has been worked normally

---

<div class="post-metadata">

**Author:** ![anon1462038](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@anon1462038](https://discuss.huggingface.co/u/anon1462038)\
**Post date:** [September 9, 2024, 10:37am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/4 "2024-09-09T10:37:16Z")

</div>

I have seen the same errors. Has it been fixed for you?

---

<div class="post-metadata">

**Author:** ![Saripudin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/saripudin/32/30416_2.png) [@Saripudin](https://discuss.huggingface.co/u/Saripudin)\
**Post date:** [September 9, 2024, 10:45am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/5 "2024-09-09T10:45:52Z")

</div>

When I tested in 2 days ago, it was working normally. But it turns out It happen error again now…

---

<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 9, 2024, 10:48am UTC](https://discuss.huggingface.co/t/serverless-inference-api-error-on-new-model/105752/6 "2024-09-09T10:48:29Z")

</div>

There were generally three problems that occurred with HF this time, limited to the image generation AI,

1. Errors that prevented the use of the Serverless Inference API, regardless of the client (can be fixed manually by following the instructions below, and new occurrences are almost never seen).
2. An error that caused very strange server-side responses on some Gradio 3.x systems (still ongoing, no workaround, but spaces that have not been restarted after the problem are safe).
3. Multiple fatal errors in Zero GPU space (the biggest one was fixed a few days ago but still remains)

## Workaround

> Setting fastapi==0.112.2 in requirements has helped me as a temporary fix.

> We just released `gradio==4.43` with the same fix. So new Gradio Spaces should work fine now (older ones will need to update the `sdk_version` in the `README.md` file)

## Workaround in Zero GPU Space

Long shit report by me.

> **[zero-gpu-explorers/README · Multiple errors associated with HF-wide Zero GPU...](https://huggingface.co/spaces/zero-gpu-explorers/README/discussions/104)**
>
> The following glitch occurs when a @spaces.GPU decorator is attached to a function (method) that is not called directly from app.py . If a function with decorators is called directly, it works. How...
