Skip to content

add weights_only=True to torch.load for secure model loading#95

Open
Rohit7824567 wants to merge 1 commit intofwitmer:masterfrom
Rohit7824567:patch-4
Open

add weights_only=True to torch.load for secure model loading#95
Rohit7824567 wants to merge 1 commit intofwitmer:masterfrom
Rohit7824567:patch-4

Conversation

@Rohit7824567
Copy link
Copy Markdown

coastline U-Net model loading used torch.load without weights_only=True,
which allows arbitrary code execution via pickle in PyTorch >= 2.0 and raises FutureWarning. Adding weights_only=True restricts deserialization to tensor data only, securing model checkpoint loading during GSoC inference runs.

 coastline U-Net model loading used torch.load without weights_only=True,
which allows arbitrary code execution via pickle in PyTorch >= 2.0 and
raises FutureWarning. Adding weights_only=True restricts deserialization
to tensor data only, securing model checkpoint loading during GSoC inference runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant