mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-07-08 22:54:54 +08:00
Fix SAM autodownload to /weights
(#3655)
This commit is contained in:
parent
82920ef7ec
commit
48d7dbdbf9
@ -100,7 +100,7 @@ def _build_sam(
|
|||||||
)
|
)
|
||||||
sam.eval()
|
sam.eval()
|
||||||
if checkpoint is not None:
|
if checkpoint is not None:
|
||||||
attempt_download_asset(checkpoint)
|
checkpoint = attempt_download_asset(checkpoint)
|
||||||
with open(checkpoint, 'rb') as f:
|
with open(checkpoint, 'rb') as f:
|
||||||
state_dict = torch.load(f)
|
state_dict = torch.load(f)
|
||||||
sam.load_state_dict(state_dict)
|
sam.load_state_dict(state_dict)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user