Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,10 +29,12 @@
|
|
29 |
|
30 |
import gradio as gr
|
31 |
import os
|
32 |
-
|
33 |
-
#
|
34 |
-
|
35 |
-
os.environ
|
|
|
|
|
36 |
from typing import *
|
37 |
import torch
|
38 |
import numpy as np
|
|
|
29 |
|
30 |
import gradio as gr
|
31 |
import os
|
32 |
+
|
33 |
+
# ---- Force CPU-only environment globally ----
|
34 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # hide any GPUs from torch
|
35 |
+
os.environ.setdefault("ATTN_BACKEND", "sdpa") # avoid xformers
|
36 |
+
os.environ.setdefault("SPCONV_ALGO", "native") # safe sparseconv algo
|
37 |
+
# ---------------------------------------------
|
38 |
from typing import *
|
39 |
import torch
|
40 |
import numpy as np
|