Skip to content

Commit

Permalink
Fix exception handling in load_loras
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk-dev committed Jul 16, 2024
1 parent ca021f7 commit aac2df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runner/app/pipelines/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ def load_loras(pipeline: any, requested_loras: str):
try:
# TODO: If we decide to keep LoRas loaded (and only set their weight to 0), make sure that reloading them causes no performance hit or other issues
pipeline.load_lora_weights(adapter, adapter_name=adapter)
except (ValueError, RuntimeError, TypeError):
except Exception as e:
logger.warning(
"Unable to load LoRas for adapter '" + adapter + "'"
"Unable to load LoRas for adapter '" + adapter + "': " + e
)
continue
# Remember adapter name and their associated strength
Expand Down

0 comments on commit aac2df2

Please sign in to comment.