Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
b20cd352
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
9 个月 前同步成功
通知
1727
Star
80
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
b20cd352
编写于
9月 30, 2023
作者:
A
AUTOMATIC1111
提交者:
GitHub
9月 30, 2023
浏览文件
操作
浏览文件
下载
差异文件
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
上级
3a4290f8
5b761b49
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
6 deletion
+7
-6
modules/launch_utils.py
modules/launch_utils.py
+2
-2
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
未找到文件。
modules/launch_utils.py
浏览文件 @
b20cd352
...
...
@@ -64,7 +64,7 @@ Use --skip-python-version-check to suppress this warning.
@
lru_cache
()
def
commit_hash
():
try
:
return
subprocess
.
check_output
([
git
,
"rev-parse"
,
"HEAD"
],
shell
=
False
,
encoding
=
'utf8'
).
strip
()
return
subprocess
.
check_output
([
git
,
"
-C"
,
script_path
,
"
rev-parse"
,
"HEAD"
],
shell
=
False
,
encoding
=
'utf8'
).
strip
()
except
Exception
:
return
"<none>"
...
...
@@ -72,7 +72,7 @@ def commit_hash():
@
lru_cache
()
def
git_tag
():
try
:
return
subprocess
.
check_output
([
git
,
"describe"
,
"--tags"
],
shell
=
False
,
encoding
=
'utf8'
).
strip
()
return
subprocess
.
check_output
([
git
,
"
-C"
,
script_path
,
"
describe"
,
"--tags"
],
shell
=
False
,
encoding
=
'utf8'
).
strip
()
except
Exception
:
try
:
...
...
modules/paths.py
浏览文件 @
b20cd352
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
浏览文件 @
b20cd352
...
...
@@ -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
浏览文件 @
b20cd352
...
...
@@ -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
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录