From d76b24569e420354c8e4fec1d4d8644cd05299ec Mon Sep 17 00:00:00 2001 From: Wok Date: Sat, 26 Jul 2025 16:22:01 +0200 Subject: [PATCH] Fix bug: default value of weights_only changed in PyTorch 2.6 --- models/fs_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/fs_model.py b/models/fs_model.py index 95ac877..8eb1f3c 100644 --- a/models/fs_model.py +++ b/models/fs_model.py @@ -61,7 +61,7 @@ class fsModel(BaseModel): # Id network netArc_checkpoint = opt.Arc_path - netArc_checkpoint = torch.load(netArc_checkpoint, map_location=torch.device("cpu")) + netArc_checkpoint = torch.load(netArc_checkpoint, map_location=torch.device("cpu"), weights_only=False) self.netArc = netArc_checkpoint self.netArc = self.netArc.to(device) self.netArc.eval()