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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user