Spaces:
Build error
Build error
Commit
Β·
2ec4f01
1
Parent(s):
29ff616
add zero gpu
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
import time
|
|
@@ -94,9 +94,7 @@ def stable_viton_model_hd(
|
|
| 94 |
pil_output = Image.fromarray(output)
|
| 95 |
return pil_output
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
@torch.no_grad()
|
| 101 |
def process_hd(vton_img, garm_img, n_steps):
|
| 102 |
model_type = 'hd'
|
|
@@ -210,4 +208,4 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 210 |
ips = [vton_img, garm_img, n_steps]
|
| 211 |
run_button.click(fn=process_hd, inputs=ips, outputs=[result_gallery])
|
| 212 |
|
| 213 |
-
demo.queue().launch(
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
import time
|
|
|
|
| 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'
|
|
|
|
| 208 |
ips = [vton_img, garm_img, n_steps]
|
| 209 |
run_button.click(fn=process_hd, inputs=ips, outputs=[result_gallery])
|
| 210 |
|
| 211 |
+
demo.queue().launch()
|