diff --git a/ultralytics/vit/sam/build.py b/ultralytics/vit/sam/build.py index b2e0986..73b1a03 100644 --- a/ultralytics/vit/sam/build.py +++ b/ultralytics/vit/sam/build.py @@ -100,7 +100,7 @@ def _build_sam( ) sam.eval() if checkpoint is not None: - attempt_download_asset(checkpoint) + checkpoint = attempt_download_asset(checkpoint) with open(checkpoint, 'rb') as f: state_dict = torch.load(f) sam.load_state_dict(state_dict)