From aac2df20011265c26fecf39abacdc27749003c2e Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Tue, 16 Jul 2024 16:03:18 +0200 Subject: [PATCH] Fix exception handling in `load_loras` --- runner/app/pipelines/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/app/pipelines/util.py b/runner/app/pipelines/util.py index 7dbbb345..e1befedc 100644 --- a/runner/app/pipelines/util.py +++ b/runner/app/pipelines/util.py @@ -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