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

FIX force_download in download utility (#4036)

FIX force_download in download utils
This commit is contained in:
Lucain
2023-07-11 12:20:00 +02:00
committed by GitHub
parent f74d5e1c2f
commit 6632823690

View File

@@ -1322,7 +1322,7 @@ class DiffusionPipeline(ConfigMixin):
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