Spaces:
Running on Zero
Running on Zero
Commit ·
c5a6704
1
Parent(s): b267be8
Fix torch.load: add weights_only=False for PyTorch 2.6 compat
Browse files- cavp_util.py +1 -1
cavp_util.py
CHANGED
|
@@ -85,7 +85,7 @@ class Extract_CAVP_Features(torch.nn.Module):
|
|
| 85 |
|
| 86 |
|
| 87 |
def init_first_from_ckpt(self, path):
|
| 88 |
-
model = torch.load(path, map_location="cpu")
|
| 89 |
if "state_dict" in list(model.keys()):
|
| 90 |
model = model["state_dict"]
|
| 91 |
# Remove: module prefix
|
|
|
|
| 85 |
|
| 86 |
|
| 87 |
def init_first_from_ckpt(self, path):
|
| 88 |
+
model = torch.load(path, map_location="cpu", weights_only=False)
|
| 89 |
if "state_dict" in list(model.keys()):
|
| 90 |
model = model["state_dict"]
|
| 91 |
# Remove: module prefix
|