Fix SAM autodownload to `/weights` (#3655)

pull/3668/head
Glenn Jocher 1 year ago committed by GitHub
parent 82920ef7ec
commit 48d7dbdbf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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)

Loading…
Cancel
Save