mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
feat: Allow support for custom wildcard directory in sd-dynamic-prompts
This commit is contained in:
@@ -33,10 +33,20 @@ try:
|
||||
except AttributeError:
|
||||
LYCO_PATH = None
|
||||
|
||||
|
||||
def find_ext_wildcard_paths():
|
||||
"""Returns the path to the extension wildcards folder"""
|
||||
found = list(EXT_PATH.glob("*/wildcards/"))
|
||||
# Try to find the wildcard path from the shared opts
|
||||
try:
|
||||
from modules.shared import opts
|
||||
except ImportError: # likely not in an a1111 context
|
||||
opts = None
|
||||
|
||||
wildcard_dir = getattr(opts, "wildcard_dir", None)
|
||||
if wildcard_dir is not None:
|
||||
wildcard_dir = Path(wildcard_dir)
|
||||
if wildcard_dir.exists():
|
||||
found.append(wildcard_dir)
|
||||
return found
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user