Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
bf08a5b7
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
9 个月 前同步成功
通知
1726
Star
80
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
bf08a5b7
编写于
2月 17, 2024
作者:
A
AUTOMATIC1111
提交者:
GitHub
2月 17, 2024
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14910 from analysisjp/wsl2_flx
fixed webui.sh issue that occurred in WSL environment (fix: #14883)
上级
48ce0379
69f9564a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
7 deletion
+5
-7
webui.sh
webui.sh
+5
-7
未找到文件。
webui.sh
浏览文件 @
bf08a5b7
...
...
@@ -227,9 +227,7 @@ fi
prepare_tcmalloc
()
{
if
[[
"
${
OSTYPE
}
"
==
"linux"
*
]]
&&
[[
-z
"
${
NO_TCMALLOC
}
"
]]
&&
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
# check glibc version
LIBC_LIB
=
"
$(
PATH
=
/usr/sbin:
$PATH
ldconfig
-p
|
grep
-P
"libc.so.6"
|
head
-n
1
)
"
LIBC_INFO
=
$(
echo
${
LIBC_LIB
}
|
awk
'{print $NF}'
)
LIBC_VER
=
$(
echo
$(
${
LIBC_INFO
}
|
awk
'NR==1 {print $NF}'
)
|
grep
-oP
'\d+\.\d+'
)
LIBC_VER
=
$(
echo
$(
ldd
--version
|
awk
'NR==1 {print $NF}'
)
|
grep
-oP
'\d+\.\d+'
)
echo
"glibc version is
$LIBC_VER
"
libc_vernum
=
$(
expr
$LIBC_VER
)
# Since 2.34 libpthread is integrated into libc.so
...
...
@@ -244,9 +242,9 @@ prepare_tcmalloc() {
TC_INFO
=(
${
TCMALLOC
//=>/
}
)
if
[[
!
-z
"
${
TC_INFO
}
"
]]
;
then
echo
"Check TCMalloc:
${
TC_INFO
}
"
# Determine if the library is linked to libpt
thread and resolve undefined symbol: pt
thread_key_create
# Determine if the library is linked to libpt
hread and resolve undefined symbol: p
thread_key_create
if
[
$(
echo
"
$libc_vernum
<
$libc_v234
"
| bc
)
-eq
1
]
;
then
# glibc < 2.3
3 pthread_key_create into libpth
ead.so. check linking libpthread.so...
# glibc < 2.3
4 pthread_key_create into libpthr
ead.so. check linking libpthread.so...
if
ldd
${
TC_INFO
[2]
}
|
grep
-q
'libpthread'
;
then
echo
"
$TC_INFO
is linked with libpthread,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
# set fullpath LD_PRELOAD (To be on the safe side)
...
...
@@ -256,7 +254,7 @@ prepare_tcmalloc() {
echo
"
$TC_INFO
is not linked with libpthread will trigger undefined symbol: pthread_Key_create error"
fi
else
# Version 2.34 of libc.so (glibc) includes the pthead library IN GLIBC. (USE ubuntu 22.04 and modern linux system and WSL)
# Version 2.34 of libc.so (glibc) includes the pth
r
ead library IN GLIBC. (USE ubuntu 22.04 and modern linux system and WSL)
# libc.so(glibc) is linked with a library that works in ALMOST ALL Linux userlands. SO NO CHECK!
echo
"
$TC_INFO
is linked with libc.so,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
# set fullpath LD_PRELOAD (To be on the safe side)
...
...
@@ -266,7 +264,7 @@ prepare_tcmalloc() {
fi
done
if
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc. Do you have tcmalloc or g
perftools
installed on your system? (improves CPU memory usage)
\e
[0m
\n
"
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc. Do you have tcmalloc or g
oogle-perftool
installed on your system? (improves CPU memory usage)
\e
[0m
\n
"
fi
fi
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录