# Does ZeroGPU not work for all spaces?

**URL:** <https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888>\
**Category:** Beginners\
**Created:** [October 25, 2024, 3:35am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888 "2024-10-25T03:35:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torbitt](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@Torbitt](https://discuss.huggingface.co/u/Torbitt)\
**Post date:** [October 25, 2024, 3:35am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/1 "2024-10-25T03:35:57Z")

</div>

Heya, was just messing around with projects like “Hallo” for talking portraits. Joined PRO, and tried duplicating a space, but just getting “runtime error - ZeroGPU has not been initialized.” Am I missing something, or is it possible to use Hallo with ZeroGPU? Thanks for any clarification! I’m an artist, not a coder. lol

I also attempted cloning to Google Colab, but stuck there as well (was just using a youtube tutorial for a completely different project)

---

<div class="post-metadata">

**Author:** ![Torbitt](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@Torbitt](https://discuss.huggingface.co/u/Torbitt)\
**Post date:** [October 25, 2024, 4:43am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/2 "2024-10-25T04:43:55Z")

</div>

Okay, it seems to load up with Dev mode enabled, but when trying to use, it pops up an error msg. “Error: No CUDA GPUs are available” What is that about?

---

<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:** [October 25, 2024, 8:57am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/3 "2024-10-25T08:57:17Z")

</div>

Maybe this is it? You don’t know because there’s no explanation.  
If you have trouble with HF, it’s easy to look at someone else’s space code that works and think about what’s different from yours.  
Kind of a hackerish way to do it…

> [@ZeroGPU has not been initialized when trying to use space in other space](https://discuss.huggingface.co/t/zerogpu-has-not-been-initialized-when-trying-to-use-space-in-other-space/104575):
>
> Hi iam trying to access a hugging face space into other space my app.py import os import gradio as gr from huggingface\_hub import HfApi from gradio\_client.exceptions import AuthenticationError def load\_space(): # Try to get the token from environment variable hf\_token = os.environ.get('api') if not hf\_token: print("Warning: HUGGINGFACE\_TOKEN environment variable not set.") print("Attempting to use Hugging Face CLI login...") try: # Attempt to …

If you have any problems or errors in the Zero GPU space, you can ask questions in the community below and get high quality answers.

> **[zero-gpu-explorers/README · Discussions](https://huggingface.co/spaces/zero-gpu-explorers/README/discussions)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![Torbitt](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@Torbitt](https://discuss.huggingface.co/u/Torbitt)\
**Post date:** [October 25, 2024, 5:38pm UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/4 "2024-10-25T17:38:06Z")

</div>

Thanks John! Despite not really knowing what I’m doing, just adding some of the “essentials” to the app.py file, and the space is loading up now. However, for some reason, it keeps refreshing/restarting every minute or so making it unusable…

Might just have to hope that someone that knows what they’re doing creates a ZeroGPU Hallo space at some point, or maybe I’ll msg in zero-gpu-explorers at some point.

---

<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:** [October 26, 2024, 1:22am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/5 "2024-10-26T01:22:35Z")

</div>

Yeah, I think you’re stuck with the default 60 seconds because Zero GPU Space is a service that lets you rent a powerful GPU for a default of 60 seconds per session and a maximum of 120 seconds.  
GPUs are too expensive, so they have to do it this way…

The moments when you really need the GPU are actually few, so the only solution is to isolate those moments into a separate function and put @spaces on it…  
For services that don’t need GPUs, you can just put dummy functions… Zero GPU space is more convenient than CPU space because CPU, RAM and storage are considerably more powerful than CPU space.

It looks like there is an existing Hallo space.

> **[TTS x Hallo Talking Portrait - a Hugging Face Space by fffiloni](https://huggingface.co/spaces/fffiloni/tts-hallo-talking-portrait)**
>
> Generate Talking avatars from Text-to-Speech

> **[Hallo - a Hugging Face Space by fudan-generative-ai](https://huggingface.co/spaces/fudan-generative-ai/hallo)**
>
> Generate realistic talking heads from image+audio

---

<div class="post-metadata">

**Author:** ![EmilyCarter01](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/emilycarter01/32/42173_2.png) [@EmilyCarter01](https://discuss.huggingface.co/u/EmilyCarter01)\
**Post date:** [February 28, 2025, 11:25am UTC](https://discuss.huggingface.co/t/does-zerogpu-not-work-for-all-spaces/113888/6 "2025-02-28T11:25:38Z")

</div>

ZeroGPU may not support all spaces due to dependency mismatches, hardware constraints, or missing WebGPU support in the runtime. Some environments require specific CUDA versions or kernel optimizations, so ensure your deployment meets compatibility requirements. Running in a different container or adjusting memory allocation may help.
