Merge 8b84ade39b09687bb4aa3311444a48cda103ec91 into 453c6e38a51e9d1d5a2aa5fb7f1014a711913397

This commit is contained in:
Defne Dilbaz 2025-04-02 16:37:26 -04:00 committed by GitHub
commit 53dbeb2c4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -730,7 +730,7 @@ def torch_safe_load(weight):
"ultralytics.yolo.data": "ultralytics.data",
}
): # for legacy 8.0 Classify and Pose models
ckpt = torch.load(file, map_location="cpu")
ckpt = torch.load(file, map_location="cpu", weights_only=False)
except ModuleNotFoundError as e: # e.name is missing module name
if e.name == "models":