Spaces:
Running on Zero
Running on Zero
Stabilize FP8 kernel loading on ZeroGPU
Browse files
app.py
CHANGED
|
@@ -14,6 +14,14 @@ import time
|
|
| 14 |
import uuid
|
| 15 |
from typing import Any
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
import gradio as gr
|
| 18 |
import spaces
|
| 19 |
import torch
|
|
|
|
| 14 |
import uuid
|
| 15 |
from typing import Any
|
| 16 |
|
| 17 |
+
# Hub kernel downloads can create concurrent tqdm bars inside a ZeroGPU worker;
|
| 18 |
+
# tqdm's shared position bookkeeping is racy there. Progress is irrelevant in
|
| 19 |
+
# a Space runtime, so disable it before importing Hugging Face libraries.
|
| 20 |
+
os.environ.setdefault("HF_HUB_DISABLE_PROGRESS_BARS", "1")
|
| 21 |
+
# DeepGEMM does not yet recognize the ZeroGPU Blackwell SM120 device. The
|
| 22 |
+
# fine-grained FP8 Triton kernel supports it and is the correct fallback.
|
| 23 |
+
os.environ.setdefault("TRANSFORMERS_DISABLE_DEEPGEMM_LINEAR", "1")
|
| 24 |
+
|
| 25 |
import gradio as gr
|
| 26 |
import spaces
|
| 27 |
import torch
|