Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,14 @@ app.py β HeightAdaptor Hugging Face Spaces App
|
|
| 3 |
Backbone : stable-diffusion-v1-5/stable-diffusion-v1-5
|
| 4 |
Adaptor : UEXdo/HeightAdaptor-weight
|
| 5 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
import os, io
|
| 8 |
import torch
|
|
@@ -16,15 +24,6 @@ from huggingface_hub import snapshot_download
|
|
| 16 |
from peft import PeftModel
|
| 17 |
import gradio as gr
|
| 18 |
|
| 19 |
-
# ββ ZeroGPU compatibilityοΌζ spaces εΊζΆθͺε¨ιηΊ§οΌβββββββββββββββββββββ
|
| 20 |
-
try:
|
| 21 |
-
import spaces
|
| 22 |
-
except ImportError:
|
| 23 |
-
class spaces:
|
| 24 |
-
@staticmethod
|
| 25 |
-
def GPU(duration=120):
|
| 26 |
-
return lambda fn: fn
|
| 27 |
-
|
| 28 |
from networks.semantic_head import SemanticHead
|
| 29 |
from networks.height_head import HeightHead
|
| 30 |
from networks.decoder import Decoder
|
|
|
|
| 3 |
Backbone : stable-diffusion-v1-5/stable-diffusion-v1-5
|
| 4 |
Adaptor : UEXdo/HeightAdaptor-weight
|
| 5 |
"""
|
| 6 |
+
# ββ ZeroGPU compatibilityοΌζ spaces εΊζΆθͺε¨ιηΊ§οΌβββββββββββββββββββββ
|
| 7 |
+
try:
|
| 8 |
+
import spaces
|
| 9 |
+
except ImportError:
|
| 10 |
+
class spaces:
|
| 11 |
+
@staticmethod
|
| 12 |
+
def GPU(duration=120):
|
| 13 |
+
return lambda fn: fn
|
| 14 |
|
| 15 |
import os, io
|
| 16 |
import torch
|
|
|
|
| 24 |
from peft import PeftModel
|
| 25 |
import gradio as gr
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
from networks.semantic_head import SemanticHead
|
| 28 |
from networks.height_head import HeightHead
|
| 29 |
from networks.decoder import Decoder
|