SIGN IN SIGN UP

Use `weights_only` for loading

sam2/build_sam.py:81:14: TOR102 [*] `torch.load` without `weights_only` parameter is unsafe. Explicitly set `weights_only` to False only if you trust the data you load and full pickle functionality is needed, otherwise set `weights_only=True`.

Found with https://github.com/pytorch-labs/torchfix/
S
Sergii Dymchenko committed
658aaba327012309786955f92aa3c15b53fddd39
Parent: 0c5f8c5
Committed by GitHub <noreply@github.com> on 7/29/2024, 11:54:54 PM