Use paths provided by webui where applicable

This doesn't solve the gradio security policy issue, just eliminates a bit of guesswork
This commit is contained in:
Dominik Reh
2023-03-26 10:58:18 +02:00
parent 2571a4f70a
commit afe3f23afa

View File

@@ -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')