aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_gradio_extensions.py
diff options
context:
space:
mode:
authorhako-mikan <122196982+hako-mikan@users.noreply.github.com>2023-11-09 12:57:57 +0000
committerGitHub <noreply@github.com>2023-11-09 12:57:57 +0000
commit816096e642187a18b11e2729c42c0b5f677f047d (patch)
tree8127b07b946b376d4276e2169ceffb7c2e64ba09 /modules/ui_gradio_extensions.py
parent6b9795849d497b41514aa9462690cf7c2802e4f6 (diff)
parent5e80d9ee99c5899e5e2b130408ffb65a0585a62a (diff)
downloadstable-diffusion-webui-gfx803-816096e642187a18b11e2729c42c0b5f677f047d.tar.gz
stable-diffusion-webui-gfx803-816096e642187a18b11e2729c42c0b5f677f047d.tar.bz2
stable-diffusion-webui-gfx803-816096e642187a18b11e2729c42c0b5f677f047d.zip
Merge branch 'dev' into master
Diffstat (limited to 'modules/ui_gradio_extensions.py')
-rw-r--r--modules/ui_gradio_extensions.py6
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)