# ZeroGPU space : No CUDA GPUs are available

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%3E%5C
**Category:** Spaces\
**Created:** [May 13, 2025, 12:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885 "2025-05-13T12:05:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IbarakiDouji](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ibarakidouji/32/47435_2.png) [@IbarakiDouji](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FIbarakiDouji)%5C
**Post date:** [May 13, 2025, 12:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%2F1 "2025-05-13T12:05:09Z")

</div>

Hello there,

So i’m working on a ZeroGPU space, and i was able to generate some images out of it.

Tho after a day, i wanted to share it with some friends and they are not able to generate (they are not logged, no the quota is not full, i also tried without login and had the same issue).

Here is the failed logs :

```auto
2025-05-13 13:50:08 - httpx - INFO - HTTP Request: POST http://device-api.zero/schedule?cgroupPath=%2Fkubepods.slice%2Fkubepods-burstable.slice%2Fkubepods-burstable-pod53d91e08_ca6f_4829_acd7_772d9f243c8d.slice%2Fcri-containerd-04c1f2c1ffa380d58455444191199b49c387cc8223de321c2ba7806ab5afb790.scope&taskId=140013534102432&enableQueue=true&tokenVersion=1&token=<hidden> "HTTP/1.1 200 OK"
2025-05-13 13:50:08 - httpx - INFO - HTTP Request: POST http://device-api.zero/allow?allowToken=30dde4f1969ce8a8e2506e28f806789a21b5458a9e8618389a54bb0f851483b7&pid=4746 "HTTP/1.1 200 OK"
2025-05-13 13:50:08 - httpx - INFO - HTTP Request: POST http://device-api.zero/release?allowToken=30dde4f1969ce8a8e2506e28f806789a21b5458a9e8618389a54bb0f851483b7&fail=true "HTTP/1.1 200 OK"
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/spaces/zero/wrappers.py", line 140, in worker_init
    torch.init(nvidia_uuid)
  File "/usr/local/lib/python3.10/site-packages/spaces/zero/torch/patching.py", line 373, in init
    torch.Tensor([0]).cuda()
  File "/usr/local/lib/python3.10/site-packages/torch/cuda/ __init__.py", line 319, in _lazy_init
    torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync( # type: ignore
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/spaces/zero/wrappers.py", line 214, in gradio_handler
    raise error("ZeroGPU worker error", res.error_cls)
gradio.exceptions.Error: 'RuntimeError'

```

and a working one :

```auto
2025-05-13 13:40:38 - httpx - INFO - HTTP Request: POST http://device-api.zero/schedule?cgroupPath=%2Fkubepods.slice%2Fkubepods-burstable.slice%2Fkubepods-burstable-pod53d91e08_ca6f_4829_acd7_772d9f243c8d.slice%2Fcri-containerd-04c1f2c1ffa380d58455444191199b49c387cc8223de321c2ba7806ab5afb790.scope&taskId=140013534102432&enableQueue=true&tokenVersion=1&token=<hidden> "HTTP/1.1 200 OK"
2025-05-13 13:40:38 - httpx - INFO - HTTP Request: POST http://device-api.zero/allow?allowToken=da5eb1a48aafb766ccf710678d8812ca135ce74d51e310832bb0a7da156dd51f&pid=4523 "HTTP/1.1 200 OK"
2025-05-13 13:40:41 - __main__ - INFO - Starting generation with parameters: {
    "prompt": "masterpiece, best quality, amazing quality, 1girl",
    "negative_prompt": "sensitive, nsfw, explicit, bad quality, worst quality, worst detail, sketch, censor",
    "resolution": "1248 x 1824",
    "guidance_scale": 7,
    "num_inference_steps": 28,
    "seed": 1857728698,
    "sampler": "Euler a",
    "use_upscaler": null
}
2025-05-13 13:40:49 - __main__ - INFO - Image 1/1 saved as ./outputs/20584bdd-e9bc-4691-8399-7bb96e8dcf7b.png
2025-05-13 13:40:49 - __main__ - INFO - Generation completed successfully in 8.03 seconds
2025-05-13 13:40:49 - httpx - INFO - HTTP Request: POST http://device-api.zero/release?allowToken=da5eb1a48aafb766ccf710678d8812ca135ce74d51e310832bb0a7da156dd51f&fail=false "HTTP/1.1 200 OK"

```

Yes, the `import spaces` is at the top.  
No i’m not using weird pipelines, just “lpw\_stable\_diffusion\_xl” copied from the repo to work with “from\_single file”

---

<div class="post-metadata">

**Author:** ![IbarakiDouji](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ibarakidouji/32/47435_2.png) [@IbarakiDouji](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FIbarakiDouji)%5C
**Post date:** [May 13, 2025, 1:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%2F2 "2025-05-13T13:12:43Z")

</div>

Just after sending the message, i got the no GPU also on my account.

And right now, it seems to be woking again both with and without account.

---

<div class="post-metadata">

**Author:** ![IbarakiDouji](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ibarakidouji/32/47435_2.png) [@IbarakiDouji](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FIbarakiDouji)%5C
**Post date:** [May 13, 2025, 7:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%2F3 "2025-05-13T19:31:45Z")

</div>

After more time it happen again.

Maybe it’s just there is too much ZeroGPU spaces used at the time.

Just hope that someone can clarify the real cause of it.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [May 14, 2025, 2:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%2F4 "2025-05-14T02:44:00Z")

</div>

After replicating it, it seems to work fine now. It probably just comes and goes.

The Zero GPU has just been replaced, so there might be a bug, so I’ll ping it just to be safe. @hysts @michellehbn

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [May 27, 2025, 9:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fzerogpu-space-no-cuda-gpus-are-available%2F154885%2F5 "2025-05-27T09:30:20Z")

</div>

Closed on May 27, 2025, 9:30am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
