mirror of
https://github.com/Wan-Video/Wan2.2.git
synced 2026-08-30 16:55:16 +08:00
Merge pull request #158 from ishaangupta-YB/main
Fix SAM-2 API compatibility issue in preprocessing pipeline
This commit is contained in:
@@ -152,6 +152,10 @@ class SAM2VideoPredictor(_SAM2VideoPredictor):
|
||||
# metadata for each tracking frame (e.g. which direction it's tracked)
|
||||
inference_state["tracking_has_started"] = False
|
||||
inference_state["frames_already_tracked"] = {}
|
||||
|
||||
# resolves KeyError: 'frames_tracked_per_obj' when using newer SAM-2 versions for running preprocessing in 'replacement mode'
|
||||
inference_state["frames_tracked_per_obj"] = {}
|
||||
|
||||
# Warm up the visual backbone and cache the image feature on frame 0
|
||||
self._get_image_feature(inference_state, frame_idx=0, batch_size=1)
|
||||
return inference_state
|
||||
Reference in New Issue
Block a user