From afe3f23afaaa70813526d1759d131b39d36ec5fc Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sun, 26 Mar 2023 10:58:18 +0200 Subject: [PATCH] Use paths provided by webui where applicable This doesn't solve the gradio security policy issue, just eliminates a bit of guesswork --- scripts/tag_autocomplete_helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index 31dce39..9daf125 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -4,13 +4,14 @@ import gradio as gr from pathlib import Path from modules import scripts, script_callbacks, shared, sd_hijack +from modules.paths import script_path, extensions_dir import yaml # Webui root path -FILE_DIR = Path().absolute() +FILE_DIR = Path(script_path) # The extension base path -EXT_PATH = FILE_DIR.joinpath('extensions') +EXT_PATH = Path(extensions_dir) # Tags base path TAGS_PATH = Path(scripts.basedir()).joinpath('tags')