Skip to content

Commit c74c5cc

Browse files
authored
[WIP] Bugfix - Pipeline.from_pretrained is broken when the pipeline is partially downloaded (huggingface#3448)
Added bugfix using f strings.
1 parent b3a9b1c commit c74c5cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pipelines/pipeline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]:
12491249

12501250
# allow all patterns from non-model folders
12511251
# this enables downloading schedulers, tokenizers, ...
1252-
allow_patterns += [os.path.join(k, "*") for k in folder_names if k not in model_folder_names]
1252+
allow_patterns += [f"{k}/*" for k in folder_names if k not in model_folder_names]
12531253
# also allow downloading config.json files with the model
12541254
allow_patterns += [os.path.join(k, "config.json") for k in model_folder_names]
12551255

0 commit comments

Comments
 (0)