Skip to content

Commit

Permalink
fix: torch load weights only as security issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sachahu1 committed Aug 8, 2024
1 parent 193bd96 commit 6fb7d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diffusion_models/utils/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def from_file(cls, file_path: str) -> "Checkpoint":
Returns:
A checkpoint instance.
"""
checkpoint = torch.load(f=file_path)
checkpoint = torch.load(f=file_path, weights_only=True)
checkpoint = cls(**checkpoint)
beta_scheduler_config = BetaSchedulerConfiguration(
**checkpoint.beta_scheduler_config
Expand Down

0 comments on commit 6fb7d39

Please sign in to comment.