1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

[WIP] Bugfix - Pipeline.from_pretrained is broken when the pipeline is partially downloaded (#3448)

Added bugfix using f strings.
This commit is contained in:
Vimarsh Chaturvedi
2023-05-17 12:05:33 +02:00
committed by GitHub
parent c09c4f3ab7
commit 415c616712

View File

@@ -1249,7 +1249,7 @@ class DiffusionPipeline(ConfigMixin):
# allow all patterns from non-model folders
# this enables downloading schedulers, tokenizers, ...
allow_patterns += [os.path.join(k, "*") for k in folder_names if k not in model_folder_names]
allow_patterns += [f"{k}/*" for k in folder_names if k not in model_folder_names]
# also allow downloading config.json files with the model
allow_patterns += [os.path.join(k, "config.json") for k in model_folder_names]