Skip to content

Commit

Permalink
fix FutureWarning with torch.load (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDolen authored Aug 19, 2024
1 parent a6ac238 commit 884ec97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ema_pytorch/post_hoc_ema.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def synthesize_ema_model(

# load checkpoint into a temporary ema model

ckpt_state_dict = torch.load(str(checkpoint))
ckpt_state_dict = torch.load(str(checkpoint), weights_only=True)
tmp_ema_model.load_state_dict(ckpt_state_dict)

# add weighted checkpoint to synthesized
Expand Down

0 comments on commit 884ec97

Please sign in to comment.