Skip to content

Commit ad7befe

Browse files
Wauplinpatrickvonplaten
authored andcommitted
FIX force_download in download utility (#4036)
FIX force_download in download utils
1 parent 1f392ad commit ad7befe

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
@@ -1311,7 +1311,7 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]:
13111311
snapshot_folder = Path(config_file).parent
13121312
pipeline_is_cached = all((snapshot_folder / f).is_file() for f in expected_files)
13131313

1314-
if pipeline_is_cached:
1314+
if pipeline_is_cached and not force_download:
13151315
# if the pipeline is cached, we can directly return it
13161316
# else call snapshot_download
13171317
return snapshot_folder

0 commit comments

Comments
 (0)