Skip to content

Commit

Permalink
Downloader: use truststore for system cert trust when available.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotonen committed Sep 13, 2024
1 parent 9f78a4c commit 72872de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ requests

# Testing
aiohttp
truststore
python-dotenv
markdown
numpy
Expand Down
5 changes: 5 additions & 0 deletions scripts/download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
from ai_diffusion.resources import Arch, ResourceKind
from ai_diffusion.resources import required_models, default_checkpoints, optional_models

try:
import truststore
truststore.inject_into_ssl()
except ImportError:
pass

def _progress(name: str, size: int | None):
return tqdm(
Expand Down

0 comments on commit 72872de

Please sign in to comment.