Skip to content

Commit fdc0e38

Browse files
Don't call the Hub if local_files_only is specifiied (huggingface#2119)
Don't call the Hub if
1 parent 180841b commit fdc0e38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
505505

506506
user_agent = http_user_agent(user_agent)
507507

508-
if is_safetensors_available():
508+
if is_safetensors_available() and not local_files_only:
509509
info = model_info(
510510
pretrained_model_name_or_path,
511511
use_auth_token=use_auth_token,

0 commit comments

Comments
 (0)