From bb82f208c031554a9961a79b3eed9778b4d01235 Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sun, 5 Feb 2023 17:19:24 +0100 Subject: [PATCH] Catch lora attribute error Should fix the issue for older webui versions. Closes #119, #124 --- scripts/tag_autocomplete_helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index e7a48d6..e0051c1 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -20,9 +20,12 @@ TAGS_PATH = Path(scripts.basedir()).joinpath('tags') # The path to the folder containing the wildcards and embeddings WILDCARD_PATH = FILE_DIR.joinpath('scripts/wildcards') EMB_PATH = Path(shared.cmd_opts.embeddings_dir) -LORA_PATH = Path(shared.cmd_opts.lora_dir) HYP_PATH = Path(shared.cmd_opts.hypernetwork_dir) +try: + LORA_PATH = Path(shared.cmd_opts.lora_dir) +except AttributeError: + LORA_PATH = None def find_ext_wildcard_paths(): """Returns the path to the extension wildcards folder"""