Spaces:
Running on Zero
Running on Zero
[Admin maintenance] Support new ZeroGPU hardware
Browse filesThank you so much for having shared this Space with the community on this demo. We have upgraded the ZeroGPU infra-structure to run on modern blackwell architecture.
For that, we need to upgrade your demo to support that. This PR fixes your demo to work with the new architecture. As this is something we broke on our end, we may merge this PR autonomously. If this breaks unexpectedly or brings unintended consequences, feel free to revert, modify or otherwise. Any issues you can email apolinario@huggingface.co
- app.py +2 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -12,6 +12,8 @@ if not hasattr(huggingface_hub, "HfFolder"):
|
|
| 12 |
try: huggingface_hub.logout()
|
| 13 |
except Exception: pass
|
| 14 |
huggingface_hub.HfFolder = HfFolder
|
|
|
|
|
|
|
| 15 |
import gradio as gr
|
| 16 |
import torch
|
| 17 |
from transformers import AutoConfig, AutoModelForCausalLM
|
|
@@ -21,7 +23,6 @@ from PIL import Image
|
|
| 21 |
|
| 22 |
import numpy as np
|
| 23 |
import os
|
| 24 |
-
import spaces # Import spaces for ZeroGPU compatibility
|
| 25 |
|
| 26 |
|
| 27 |
# Load model and processor
|
|
|
|
| 12 |
try: huggingface_hub.logout()
|
| 13 |
except Exception: pass
|
| 14 |
huggingface_hub.HfFolder = HfFolder
|
| 15 |
+
import spaces # Import spaces for ZeroGPU compatibility. Must precede torch/transformers/janus
|
| 16 |
+
# imports: spaces patches torch.cuda before CUDA is initialized in the parent process.
|
| 17 |
import gradio as gr
|
| 18 |
import torch
|
| 19 |
from transformers import AutoConfig, AutoModelForCausalLM
|
|
|
|
| 23 |
|
| 24 |
import numpy as np
|
| 25 |
import os
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
# Load model and processor
|
requirements.txt
CHANGED
|
@@ -4,5 +4,6 @@ gradio
|
|
| 4 |
numpy
|
| 5 |
torch
|
| 6 |
safetensors
|
| 7 |
-
transformers
|
|
|
|
| 8 |
git+https://github.com/deepseek-ai/Janus
|
|
|
|
| 4 |
numpy
|
| 5 |
torch
|
| 6 |
safetensors
|
| 7 |
+
transformers<5.0.0
|
| 8 |
+
pydantic<2.11
|
| 9 |
git+https://github.com/deepseek-ai/Janus
|