Skip to content

Commit 2cf34e6

Browse files
[from_pretrained] only load config one time (huggingface#2131)
1 parent 04ad948 commit 2cf34e6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
531531
)
532532
else:
533533
cached_folder = pretrained_model_name_or_path
534-
535-
config_dict = cls.load_config(cached_folder)
534+
config_dict = cls.load_config(cached_folder)
536535

537536
# 2. Load the pipeline class, if using custom module then load it from the hub
538537
# if we load from explicit class, let's use it

0 commit comments

Comments
 (0)