diff options
author | kurisu_u <73207840+lanyeeee@users.noreply.github.com> | 2023-12-30 13:47:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 13:47:59 +0000 |
commit | d05f9e8124160d5ef6fcea6523585f613f375fac (patch) | |
tree | c2898250b3f96ccf791c9b4ebf7faf7f12f1a128 /modules/ui_gradio_extensions.py | |
parent | c069c2c5628728c9506dd034ef98e6335fd5bb34 (diff) | |
parent | adcd65ba3493fc91c9d7c843d7e14275ad6fd881 (diff) | |
download | stable-diffusion-webui-gfx803-d05f9e8124160d5ef6fcea6523585f613f375fac.tar.gz stable-diffusion-webui-gfx803-d05f9e8124160d5ef6fcea6523585f613f375fac.tar.bz2 stable-diffusion-webui-gfx803-d05f9e8124160d5ef6fcea6523585f613f375fac.zip |
Merge branch 'dev' into api_thread_safe
Diffstat (limited to 'modules/ui_gradio_extensions.py')
-rw-r--r-- | modules/ui_gradio_extensions.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/ui_gradio_extensions.py b/modules/ui_gradio_extensions.py index 0d368f8b..a86c368e 100644 --- a/modules/ui_gradio_extensions.py +++ b/modules/ui_gradio_extensions.py @@ -1,17 +1,12 @@ import os
import gradio as gr
-from modules import localization, shared, scripts
-from modules.paths import script_path, data_path, cwd
+from modules import localization, shared, scripts, util
+from modules.paths import script_path, data_path
def webpath(fn):
- if fn.startswith(cwd):
- web_path = os.path.relpath(fn, cwd)
- else:
- web_path = os.path.abspath(fn)
-
- return f'file={web_path}?{os.path.getmtime(fn)}'
+ return f'file={util.truncate_path(fn)}?{os.path.getmtime(fn)}'
def javascript_html():
|