Spaces:
Running on Zero
Running on Zero
Vansh Chugh commited on
Commit ·
80bfd67
1
Parent(s): 7d124ae
Fix ZeroGPU import order: spaces must be imported before torch
Browse files
app.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
import sys
|
| 2 |
sys.stdout.reconfigure(line_buffering=True)
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import gc
|
| 5 |
import tempfile
|
| 6 |
import threading
|
|
@@ -13,12 +19,6 @@ import gradio as gr
|
|
| 13 |
from huggingface_hub import hf_hub_download
|
| 14 |
from diffusers import FlowMatchEulerDiscreteScheduler
|
| 15 |
|
| 16 |
-
try:
|
| 17 |
-
import spaces
|
| 18 |
-
def gpu_decorator(func): return spaces.GPU(func, duration=120)
|
| 19 |
-
except ImportError:
|
| 20 |
-
def gpu_decorator(func): return func
|
| 21 |
-
|
| 22 |
from pyharp import ModelCard, build_endpoint
|
| 23 |
from unison.models.mmaudio.features_utils import FeaturesUtils
|
| 24 |
from unison.pipelines.infer import (
|
|
|
|
| 1 |
import sys
|
| 2 |
sys.stdout.reconfigure(line_buffering=True)
|
| 3 |
|
| 4 |
+
try:
|
| 5 |
+
import spaces
|
| 6 |
+
def gpu_decorator(func): return spaces.GPU(func, duration=120)
|
| 7 |
+
except ImportError:
|
| 8 |
+
def gpu_decorator(func): return func
|
| 9 |
+
|
| 10 |
import gc
|
| 11 |
import tempfile
|
| 12 |
import threading
|
|
|
|
| 19 |
from huggingface_hub import hf_hub_download
|
| 20 |
from diffusers import FlowMatchEulerDiscreteScheduler
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
from pyharp import ModelCard, build_endpoint
|
| 23 |
from unison.models.mmaudio.features_utils import FeaturesUtils
|
| 24 |
from unison.pipelines.infer import (
|