From a0f3a3260b22c9ec147a55986e7d9dd96a1fda11 Mon Sep 17 00:00:00 2001 From: Wauplin Date: Tue, 11 Jul 2023 09:21:15 +0200 Subject: [PATCH] FIX force_download in download utils --- src/diffusers/pipelines/pipeline_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffusers/pipelines/pipeline_utils.py b/src/diffusers/pipelines/pipeline_utils.py index 7abb2db5235f..c2b7399be080 100644 --- a/src/diffusers/pipelines/pipeline_utils.py +++ b/src/diffusers/pipelines/pipeline_utils.py @@ -1322,7 +1322,7 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]: snapshot_folder = Path(config_file).parent pipeline_is_cached = all((snapshot_folder / f).is_file() for f in expected_files) - if pipeline_is_cached: + if pipeline_is_cached and not force_download: # if the pipeline is cached, we can directly return it # else call snapshot_download return snapshot_folder