ac5113 commited on
Commit
87085ba
·
1 Parent(s): 8d96dcc

added no_grad

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- cont, _, _ = deco_model(img)
 
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):