Skip to content

Commit 1d59cfb

Browse files
committed
weights_only=False because torch by default set it to True on 2.6+
1 parent 054ca0d commit 1d59cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roboflow/util/model_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _process_yolo(model_type: str, model_path: str, filename: str) -> str:
123123
"or through the Roboflow platform"
124124
)
125125

126-
model = torch.load(os.path.join(model_path, filename))
126+
model = torch.load(os.path.join(model_path, filename), map_location="cpu", weights_only=False)
127127

128128
model_instance = model["model"] if "model" in model and model["model"] is not None else model["ema"]
129129

0 commit comments

Comments
 (0)