Spaces:
Running on Zero
Running on Zero
[Admin maintenance] Support new ZeroGPU hardware
#2
by multimodalart HF Staff - opened
app.py
CHANGED
|
@@ -15,6 +15,7 @@ if not hasattr(huggingface_hub, "HfFolder"):
|
|
| 15 |
try: huggingface_hub.logout()
|
| 16 |
except Exception: pass
|
| 17 |
huggingface_hub.HfFolder = HfFolder
|
|
|
|
| 18 |
import os
|
| 19 |
import sys
|
| 20 |
sys.path.append("./")
|
|
@@ -30,7 +31,6 @@ from transformers import (
|
|
| 30 |
)
|
| 31 |
from diffusers import VQModel
|
| 32 |
import gradio as gr
|
| 33 |
-
import spaces
|
| 34 |
|
| 35 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 36 |
|
|
|
|
| 15 |
try: huggingface_hub.logout()
|
| 16 |
except Exception: pass
|
| 17 |
huggingface_hub.HfFolder = HfFolder
|
| 18 |
+
import spaces # ensure spaces is imported before any CUDA/torch import (ZeroGPU fork)
|
| 19 |
import os
|
| 20 |
import sys
|
| 21 |
sys.path.append("./")
|
|
|
|
| 31 |
)
|
| 32 |
from diffusers import VQModel
|
| 33 |
import gradio as gr
|
|
|
|
| 34 |
|
| 35 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 36 |
|