Skip to content

Commit 09e2d8f

Browse files
authored
fix: support transformer models' generation_config in pipeline
1 parent 81440fd commit 09e2d8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,8 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]:
14331433
allow_patterns += [f"{custom_pipeline}.py"] if f"{custom_pipeline}.py" in filenames else []
14341434
# also allow downloading config.json files with the model
14351435
allow_patterns += [os.path.join(k, "config.json") for k in model_folder_names]
1436+
# also allow downloading generation_config.json of the transformers model
1437+
allow_patterns += [os.path.join(k, "generation_config.json") for k in model_folder_names]
14361438
allow_patterns += [
14371439
SCHEDULER_CONFIG_NAME,
14381440
CONFIG_NAME,

0 commit comments

Comments
 (0)