We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21e259d commit 03935d3Copy full SHA for 03935d3
src/transformers/modeling_utils.py
@@ -3393,7 +3393,7 @@ def from_pretrained(
3393
if resolved_archive_file is not None:
3394
is_sharded = True
3395
3396
- if resolved_archive_file is not None:
+ if not local_files_only and resolved_archive_file is not None:
3397
if filename in [WEIGHTS_NAME, WEIGHTS_INDEX_NAME]:
3398
# If the PyTorch file was found, check if there is a safetensors file on the repository
3399
# If there is no safetensors file on the repositories, start an auto conversion
0 commit comments