Spaces:
Configuration error
Configuration error
Commit
Β·
dd9377b
1
Parent(s):
f140a98
add space GPU
Browse files
app.py
CHANGED
|
@@ -55,8 +55,8 @@ model2.load_state_dict(torch.load("./checkpoints/VITONHD_1024.ckpt", map_locatio
|
|
| 55 |
model2 = model.cuda()
|
| 56 |
model2.eval()
|
| 57 |
sampler2 = PLMSSampler(model2)
|
| 58 |
-
|
| 59 |
# #### model init <<<<
|
|
|
|
| 60 |
@spaces.GPU
|
| 61 |
@torch.autocast("cuda")
|
| 62 |
@torch.no_grad()
|
|
@@ -98,6 +98,7 @@ def stable_viton_model_hd(
|
|
| 98 |
pil_output = Image.fromarray(output)
|
| 99 |
return pil_output
|
| 100 |
|
|
|
|
| 101 |
@torch.autocast("cuda")
|
| 102 |
@torch.no_grad()
|
| 103 |
def stable_viton_model_hd2(
|
|
@@ -138,7 +139,7 @@ def stable_viton_model_hd2(
|
|
| 138 |
pil_output = Image.fromarray(output)
|
| 139 |
return pil_output
|
| 140 |
|
| 141 |
-
|
| 142 |
@torch.no_grad()
|
| 143 |
def process_hd(vton_img, garm_img, n_steps, is_custom):
|
| 144 |
model_type = 'hd'
|
|
|
|
| 55 |
model2 = model.cuda()
|
| 56 |
model2.eval()
|
| 57 |
sampler2 = PLMSSampler(model2)
|
|
|
|
| 58 |
# #### model init <<<<
|
| 59 |
+
|
| 60 |
@spaces.GPU
|
| 61 |
@torch.autocast("cuda")
|
| 62 |
@torch.no_grad()
|
|
|
|
| 98 |
pil_output = Image.fromarray(output)
|
| 99 |
return pil_output
|
| 100 |
|
| 101 |
+
@spaces.GPU
|
| 102 |
@torch.autocast("cuda")
|
| 103 |
@torch.no_grad()
|
| 104 |
def stable_viton_model_hd2(
|
|
|
|
| 139 |
pil_output = Image.fromarray(output)
|
| 140 |
return pil_output
|
| 141 |
|
| 142 |
+
@spaces.GPU
|
| 143 |
@torch.no_grad()
|
| 144 |
def process_hd(vton_img, garm_img, n_steps, is_custom):
|
| 145 |
model_type = 'hd'
|