mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Do not trigger autoconversion if local_files_only (#31004)
This commit is contained in:
parent
21e259d8c5
commit
03935d300d
@ -3393,7 +3393,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
||||
if resolved_archive_file is not None:
|
||||
is_sharded = True
|
||||
|
||||
if resolved_archive_file is not None:
|
||||
if not local_files_only and resolved_archive_file is not None:
|
||||
if filename in [WEIGHTS_NAME, WEIGHTS_INDEX_NAME]:
|
||||
# If the PyTorch file was found, check if there is a safetensors file on the repository
|
||||
# If there is no safetensors file on the repositories, start an auto conversion
|
||||
|
Loading…
Reference in New Issue
Block a user