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 Patrick von Platen
parent 1f392ad45b
commit ad7befeb2f

View File

@@ -1311,7 +1311,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