Unverified Commit 03935d30 authored by Lucain's avatar Lucain Committed by GitHub
Browse files

Do not trigger autoconversion if local_files_only (#31004)

parent 21e259d8
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment