diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-09-13 07:05:55 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-09-13 07:05:55 +0000 |
commit | 5b761b49ade392eb8ff4c54ab1841b63475b5dd0 (patch) | |
tree | d427f8f5d56decc5071d6655f548c1c88f0cbf97 /modules/ui_gradio_extensions.py | |
parent | 6fb2194d9cc2c9b52bc2006117d592283e00b7d6 (diff) | |
download | stable-diffusion-webui-gfx803-5b761b49ade392eb8ff4c54ab1841b63475b5dd0.tar.gz stable-diffusion-webui-gfx803-5b761b49ade392eb8ff4c54ab1841b63475b5dd0.tar.bz2 stable-diffusion-webui-gfx803-5b761b49ade392eb8ff4c54ab1841b63475b5dd0.zip |
correct webpath when webui_dir is not work_dir
Diffstat (limited to 'modules/ui_gradio_extensions.py')
-rw-r--r-- | modules/ui_gradio_extensions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ui_gradio_extensions.py b/modules/ui_gradio_extensions.py index b824b113..0d368f8b 100644 --- a/modules/ui_gradio_extensions.py +++ b/modules/ui_gradio_extensions.py @@ -2,12 +2,12 @@ import os import gradio as gr
from modules import localization, shared, scripts
-from modules.paths import script_path, data_path
+from modules.paths import script_path, data_path, cwd
def webpath(fn):
- if fn.startswith(script_path):
- web_path = os.path.relpath(fn, script_path).replace('\\', '/')
+ if fn.startswith(cwd):
+ web_path = os.path.relpath(fn, cwd)
else:
web_path = os.path.abspath(fn)
|