Fix HF image predictor

This commit is contained in:
Haitham Khedr
2024-08-12 23:41:41 +00:00
parent dce7b5446f
commit 1191677e1e
3 changed files with 9 additions and 4 deletions

View File

@@ -121,7 +121,7 @@ class SAM2VideoPredictor(SAM2Base):
from sam2.build_sam import build_sam2_video_predictor_hf
sam_model = build_sam2_video_predictor_hf(model_id, **kwargs)
return cls(sam_model)
return sam_model
def _obj_id_to_idx(self, inference_state, obj_id):
"""Map client-side object id to model-side object index."""