Spaces:
mucusz
/
Runtime error

Yuliang commited on
Commit
109e2dc
·
1 Parent(s): 41007f8

Update apps/infer.py

Browse files
Files changed (1) hide show
  1. apps/infer.py +8 -8
apps/infer.py CHANGED
@@ -657,13 +657,13 @@ def generate_model(in_path, fitting_step=50):
657
  overlap_path = img_overlap_path
658
  vis_tensor_path = osp.join(out_dir, cfg.name, f"vid/{data['name']}_in_tensor.pt")
659
 
660
- # # clean all the variables
661
- # for element in dir():
662
- # if 'path' not in element:
663
- # del locals()[element]
664
-
665
- # import gc
666
- # gc.collect()
667
- # torch.cuda.empty_cache()
668
 
669
  return [smpl_glb_path, refine_glb_path, overlap_path, vis_tensor_path]
 
657
  overlap_path = img_overlap_path
658
  vis_tensor_path = osp.join(out_dir, cfg.name, f"vid/{data['name']}_in_tensor.pt")
659
 
660
+ # clean all the variables
661
+ for element in dir():
662
+ if 'path' not in element:
663
+ del locals()[element]
664
+
665
+ import gc
666
+ gc.collect()
667
+ torch.cuda.empty_cache()
668
 
669
  return [smpl_glb_path, refine_glb_path, overlap_path, vis_tensor_path]