Spaces:
Sleeping
Sleeping
added no_grad
Browse files
app.py
CHANGED
@@ -146,7 +146,8 @@ def main(img_src, out_dir='demo_out', model_path='checkpoint/deco_best.pth', mes
|
|
146 |
img = img[np.newaxis,:,:,:]
|
147 |
img = torch.tensor(img, dtype = torch.float32).to(device)
|
148 |
|
149 |
-
|
|
|
150 |
cont = cont.detach().cpu().numpy().squeeze()
|
151 |
cont_smpl = []
|
152 |
for indx, i in enumerate(cont):
|
|
|
146 |
img = img[np.newaxis,:,:,:]
|
147 |
img = torch.tensor(img, dtype = torch.float32).to(device)
|
148 |
|
149 |
+
with torch.no_grad():
|
150 |
+
cont, _, _ = deco_model(img)
|
151 |
cont = cont.detach().cpu().numpy().squeeze()
|
152 |
cont_smpl = []
|
153 |
for indx, i in enumerate(cont):
|