PengWeixuanSZU commited on
Commit
3e68915
·
verified ·
1 Parent(s): 83f7a0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -248,8 +248,7 @@ def track_video(n_frames, video_state):
248
  video_state["origin_images"] = images
249
  images = np.array(images)
250
 
251
- video_predictor = build_sam2_video_predictor(config, sam2_checkpoint, device="cuda")
252
-
253
 
254
  inference_state = video_predictor.init_state(images=images/255, device="cuda")
255
  video_state["inference_state"] = inference_state
 
248
  video_state["origin_images"] = images
249
  images = np.array(images)
250
 
251
+ video_predictor = video_predictor.to("cuda")
 
252
 
253
  inference_state = video_predictor.init_state(images=images/255, device="cuda")
254
  video_state["inference_state"] = inference_state