aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_gradio_extensions.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-12-14 10:10:43 +0300
committerGitHub <noreply@github.com>2023-12-14 10:10:43 +0300
commit097140ac1a3caf6e3c9980a757d4b52e6a76b789 (patch)
treec31cf29908f94e7f6792b063df4543d6f83b423c /modules/ui_gradio_extensions.py
parentbda86f0fd9653657c146f7c1128f92771d16ad4e (diff)
parent778a30a95e216f9f7ce0126dbbdb1334afc3d796 (diff)
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)