We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
offload_state_to_cpu=True
SAM2VideoPredictor
1 parent 393ae33 commit 722d1d1Copy full SHA for 722d1d1
sam2/sam2_video_predictor.py
@@ -591,7 +591,8 @@ def propagate_in_video(
591
if frame_idx in obj_output_dict["cond_frame_outputs"]:
592
storage_key = "cond_frame_outputs"
593
current_out = obj_output_dict[storage_key][frame_idx]
594
- pred_masks = current_out["pred_masks"]
+ device = inference_state["device"]
595
+ pred_masks = current_out["pred_masks"].to(device, non_blocking=True)
596
if self.clear_non_cond_mem_around_input:
597
# clear non-conditioning memory of the surrounding frames
598
self._clear_obj_non_cond_mem_around_input(
0 commit comments