Skip to content

Commit

Permalink
Merge pull request #395 from Haidra-Org/main
Browse files Browse the repository at this point in the history
fix: punt lora downloads on 5xx (other than 500)
  • Loading branch information
tazlin authored Jan 7, 2025
2 parents 4fe702f + a0555b4 commit 46cf7a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hordelib/model_manager/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ def _get_json(self, url):
if response.status_code == 500:
logger.debug(f"url '{url}' download failed with status code {response.status_code}")
retries += 3
elif response.status_code > 500:
# We're going to assume all other 5xx errors are not going to pass quickly
logger.debug(f"url '{url}' download failed with status code {response.status_code}")
return None

# The json being invalid is a CivitAI issue, possibly it showing an HTML page and
# this isn't likely to change in the next 30 seconds, so we'll try twice more
Expand Down

0 comments on commit 46cf7a7

Please sign in to comment.