Skip to content

Commit 906e52e

Browse files
matsumotosanBorda
andauthored
Update src/lightning/fabric/utilities/cloud_io.py
Co-authored-by: Jirka Borovec <[email protected]>
1 parent 7d6174a commit 906e52e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/fabric/utilities/cloud_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _load(
5656
weights_only=weights_only,
5757
)
5858
if str(path_or_url).startswith("http"):
59-
if weights_only is None:
59+
if weights_only is None and _TORCH_GREATER_EQUAL_2_6:
6060
weights_only = True
6161
log.debug(f"Default to `weights_only=True` for remote checkpoint: {path_or_url}")
6262
return torch.hub.load_state_dict_from_url(

0 commit comments

Comments
 (0)