We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75f15f3 commit 12aa316Copy full SHA for 12aa316
src/transformers/modeling_utils.py
@@ -3390,7 +3390,7 @@ def from_pretrained(
3390
if resolved_archive_file is not None:
3391
is_sharded = True
3392
3393
- if resolved_archive_file is not None:
+ if not local_files_only and resolved_archive_file is not None:
3394
if filename in [WEIGHTS_NAME, WEIGHTS_INDEX_NAME]:
3395
# If the PyTorch file was found, check if there is a safetensors file on the repository
3396
# If there is no safetensors file on the repositories, start an auto conversion
0 commit comments