From 778c69e6513abae2fc174a56a750d7a659aa3c2b Mon Sep 17 00:00:00 2001 From: Pedro Cuenca Date: Mon, 26 Dec 2022 17:42:53 +0100 Subject: [PATCH] Avoid duplicating PyTorch + safetensors downloads. --- src/diffusers/pipeline_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/diffusers/pipeline_utils.py b/src/diffusers/pipeline_utils.py index 23c4b29a53ae..50fbbedc996c 100644 --- a/src/diffusers/pipeline_utils.py +++ b/src/diffusers/pipeline_utils.py @@ -495,6 +495,8 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P ) if is_safetensors_compatible(info): ignore_patterns.append("*.bin") + else: + ignore_patterns.append("*.safetensors") # download all allow_patterns cached_folder = snapshot_download(