Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
5b761b49
Commit
5b761b49
authored
Sep 13, 2023
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct webpath when webui_dir is not work_dir
parent
6fb2194d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
modules/paths.py
modules/paths.py
+1
-1
modules/paths_internal.py
modules/paths_internal.py
+1
-0
modules/ui_gradio_extensions.py
modules/ui_gradio_extensions.py
+3
-3
No files found.
modules/paths.py
View file @
5b761b49
import
os
import
sys
from
modules.paths_internal
import
models_path
,
script_path
,
data_path
,
extensions_dir
,
extensions_builtin_dir
# noqa: F401
from
modules.paths_internal
import
models_path
,
script_path
,
data_path
,
extensions_dir
,
extensions_builtin_dir
,
cwd
# noqa: F401
import
modules.safe
# noqa: F401
...
...
modules/paths_internal.py
View file @
5b761b49
...
...
@@ -8,6 +8,7 @@ import shlex
commandline_args
=
os
.
environ
.
get
(
'COMMANDLINE_ARGS'
,
""
)
sys
.
argv
+=
shlex
.
split
(
commandline_args
)
cwd
=
os
.
getcwd
()
modules_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
script_path
=
os
.
path
.
dirname
(
modules_path
)
...
...
modules/ui_gradio_extensions.py
View file @
5b761b49
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment