Spaces:
Build error
Build error
Commit
ยท
4e09d36
1
Parent(s):
a9a0ec2
detectron2
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import spaces
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
import time
|
|
@@ -21,7 +21,7 @@ from utils_stableviton import get_batch, get_mask_location, tensor2img
|
|
| 21 |
PROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()
|
| 22 |
sys.path.insert(0, str(PROJECT_ROOT))
|
| 23 |
|
| 24 |
-
from detectron2.projects.DensePose.apply_net_gradio import DensePose4Gradio
|
| 25 |
from preprocess.humanparsing.run_parsing import Parsing
|
| 26 |
from preprocess.openpose.run_openpose import OpenPose
|
| 27 |
|
|
@@ -94,7 +94,7 @@ def stable_viton_model_hd(
|
|
| 94 |
pil_output = Image.fromarray(output)
|
| 95 |
return pil_output
|
| 96 |
|
| 97 |
-
@spaces.GPU # TODO: turn on when final upload
|
| 98 |
@torch.no_grad()
|
| 99 |
def process_hd(vton_img, garm_img, n_steps):
|
| 100 |
model_type = 'hd'
|
|
|
|
| 1 |
+
# import spaces
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
import time
|
|
|
|
| 21 |
PROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()
|
| 22 |
sys.path.insert(0, str(PROJECT_ROOT))
|
| 23 |
|
| 24 |
+
from preprocess.detectron2.projects.DensePose.apply_net_gradio import DensePose4Gradio
|
| 25 |
from preprocess.humanparsing.run_parsing import Parsing
|
| 26 |
from preprocess.openpose.run_openpose import OpenPose
|
| 27 |
|
|
|
|
| 94 |
pil_output = Image.fromarray(output)
|
| 95 |
return pil_output
|
| 96 |
|
| 97 |
+
# @spaces.GPU # TODO: turn on when final upload
|
| 98 |
@torch.no_grad()
|
| 99 |
def process_hd(vton_img, garm_img, n_steps):
|
| 100 |
model_type = 'hd'
|