JasonYinnnn commited on
Commit
a08e831
·
1 Parent(s): 607259b

mv dpt pack to cpu after run_dpt

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -275,6 +275,10 @@ def run_depth_estimation(
275
  "scale": scale,
276
  }
277
  )
 
 
 
 
278
 
279
  trimesh.PointCloud(scene_est_depth_pts.reshape(-1, 3), scene_est_depth_pts_colors.reshape(-1, 3)).\
280
  apply_translation(-trans).apply_scale(1. / (scale + 1e-6)).\
 
275
  "scale": scale,
276
  }
277
  )
278
+
279
+ for k, v in dpt_pack.items():
280
+ if isinstance(v, torch.Tensor):
281
+ dpt_pack[k] = v.to('cpu')
282
 
283
  trimesh.PointCloud(scene_est_depth_pts.reshape(-1, 3), scene_est_depth_pts_colors.reshape(-1, 3)).\
284
  apply_translation(-trans).apply_scale(1. / (scale + 1e-6)).\