Skip to content

Commit 31be422

Browse files
Don't call the Hub if local_files_only is specifiied (huggingface#2119)
Don't call the Hub if
1 parent 43c5ac2 commit 31be422

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
@@ -501,7 +501,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
501501

502502
user_agent = http_user_agent(user_agent)
503503

504-
if is_safetensors_available():
504+
if is_safetensors_available() and not local_files_only:
505505
info = model_info(
506506
pretrained_model_name_or_path,
507507
use_auth_token=use_auth_token,

0 commit comments

Comments
 (0)