Skip to content

Commit 12aa316

Browse files
WauplinArthurZucker
authored andcommitted
Do not trigger autoconversion if local_files_only (huggingface#31004)
1 parent 75f15f3 commit 12aa316

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/modeling_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3390,7 +3390,7 @@ def from_pretrained(
33903390
if resolved_archive_file is not None:
33913391
is_sharded = True
33923392

3393-
if resolved_archive_file is not None:
3393+
if not local_files_only and resolved_archive_file is not None:
33943394
if filename in [WEIGHTS_NAME, WEIGHTS_INDEX_NAME]:
33953395
# If the PyTorch file was found, check if there is a safetensors file on the repository
33963396
# If there is no safetensors file on the repositories, start an auto conversion

0 commit comments

Comments
 (0)