Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use weights_only for loading#2

Merged
haithamkhedr merged 2 commits into
facebookresearch:mainfrom
kit1980:patch-1
Oct 1, 2024
Merged

Use weights_only for loading#2
haithamkhedr merged 2 commits into
facebookresearch:mainfrom
kit1980:patch-1

Conversation

@kit1980

@kit1980 kit1980 commented Jul 29, 2024

Copy link
Copy Markdown
Contributor

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/

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/
@kit1980

kit1980 commented Sep 20, 2024

Copy link
Copy Markdown
Contributor Author

@haithamkhedr can you merge this?

@haithamkhedr haithamkhedr merged commit 52198ea into facebookresearch:main Oct 1, 2024
mahmoudzaouali pushed a commit to mahmoudzaouali/sam2 that referenced this pull request Jul 31, 2025
yudataguy added a commit to yudataguy/sam2-moon that referenced this pull request Nov 10, 2025
maximuswatkins pushed a commit to owen24819/CellSam2 that referenced this pull request May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants