Skip to content

Commit 2306dc4

Browse files
vimarshchari10599
authored andcommitted
[WIP] Bugfix - Pipeline.from_pretrained is broken when the pipeline is partially downloaded (huggingface#3448)
Added bugfix using f strings.
1 parent 8804fee commit 2306dc4

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
@@ -1270,7 +1270,7 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]:
12701270

12711271
# allow all patterns from non-model folders
12721272
# this enables downloading schedulers, tokenizers, ...
1273-
allow_patterns += [os.path.join(k, "*") for k in folder_names if k not in model_folder_names]
1273+
allow_patterns += [f"{k}/*" for k in folder_names if k not in model_folder_names]
12741274
# also allow downloading config.json files with the model
12751275
allow_patterns += [os.path.join(k, "config.json") for k in model_folder_names]
12761276

0 commit comments

Comments
 (0)