From 5f77fa26d3f8f00c1df87f3ebf24d22388e25c9d Mon Sep 17 00:00:00 2001 From: DominikDoom <34448969+DominikDoom@users.noreply.github.com> Date: Sun, 4 Feb 2024 12:04:02 +0100 Subject: [PATCH 1/2] Update README.md Add feedback wanted notice --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4d583fd..3c9e90a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Booru style tag autocompletion for the AUTOMATIC1111 Stable Diffusion WebUI
+#### ⚠️ Notice: +I am currently looking for feedback on a new feature I'm working on and want to release soon.
+Please check [the announcement post](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/discussions/270) for more info if you are interested to help. + # 📄 Description Tag Autocomplete is an extension for the popular [AUTOMATIC1111 web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) for Stable Diffusion. From 22472ac8ad51bcd1bf8767ee5da0703e2f3e5473 Mon Sep 17 00:00:00 2001 From: rkfg Date: Sun, 4 Feb 2024 16:09:58 +0300 Subject: [PATCH 2/2] Hide loras according to settings --- scripts/tag_autocomplete_helper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index e5a77cc..86710f8 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -272,13 +272,21 @@ except Exception as e: # print(f'Exception setting-up performant fetchers: {e}') +def is_visible(p: Path) -> bool: + if getattr(shared.opts, "extra_networks_hidden_models", "When searched") != "Never": + return True + for part in p.parts: + if part.startswith('.'): + return False + return True + def get_lora(): """Write a list of all lora""" # Get hashes valid_loras = _get_lora() loras_with_hash = [] for l in valid_loras: - if not l.exists() or not l.is_file(): + if not l.exists() or not l.is_file() or not is_visible(l): continue name = l.relative_to(LORA_PATH).as_posix() if model_keyword_installed: @@ -296,7 +304,7 @@ def get_lyco(): valid_lycos = _get_lyco() lycos_with_hash = [] for ly in valid_lycos: - if not ly.exists() or not ly.is_file(): + if not ly.exists() or not ly.is_file() or not is_visible(ly): continue name = ly.relative_to(LYCO_PATH).as_posix() if model_keyword_installed: