Skip to content

Commit

Permalink
fix: integrity check models too in download_models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Nov 14, 2023
1 parent c5da46a commit 1acbc78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def download_all_models() -> None:
logger.error(f"Failed to download model {model}")
any_model_failed_to_download = True

if not SharedModelManager.manager.compvis.validate_model(model):
SharedModelManager.manager.compvis.taint_model(model)
SharedModelManager.manager.compvis.download_model(model)

if any_model_failed_to_download:
logger.error("Failed to download all models.")
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ torch>=2.1.0

horde_sdk>=0.7.15
git+https://github.com/Haidra-Org/horde-safety@nsfw-checking-and-anime-handling
hordelib>=2.0.2
hordelib>=2.1.2
horde_model_reference

python-dotenv
Expand Down

0 comments on commit 1acbc78

Please sign in to comment.