diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-09-30 06:23:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-30 06:23:32 +0000 |
commit | b20cd352d913368b9969e9f32c1451a067b6a66b (patch) | |
tree | d41aa14a4b7eeb4668cc49c0489fa65f1eb9fd3c /modules/ui_gradio_extensions.py | |
parent | 3a4290f8331164e4e9778b1d5fe3e27d4bb8f349 (diff) | |
parent | 5b761b49ade392eb8ff4c54ab1841b63475b5dd0 (diff) | |
download | stable-diffusion-webui-gfx803-b20cd352d913368b9969e9f32c1451a067b6a66b.tar.gz stable-diffusion-webui-gfx803-b20cd352d913368b9969e9f32c1451a067b6a66b.tar.bz2 stable-diffusion-webui-gfx803-b20cd352d913368b9969e9f32c1451a067b6a66b.zip |
Merge pull request #13210 from AUTOMATIC1111/fetch-version-info-when-webui_dir-is-not-work_dir-
fix issues 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)
|