Skip to content

Commit

Permalink
Avoid duplicating PyTorch + safetensors downloads. (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcuenca authored Dec 27, 2022
1 parent 1f1b6c6 commit 68e2425
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/diffusers/pipeline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 68e2425

Please sign in to comment.