Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
165ab44f
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
11 个月 前同步成功
通知
1758
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
165ab44f
编写于
5月 29, 2023
作者:
A
Aarni Koskela
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use os.makedirs(..., exist_ok=True)
上级
59419bd6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
15 deletion
+6
-15
modules/codeformer_model.py
modules/codeformer_model.py
+1
-3
modules/extensions.py
modules/extensions.py
+1
-2
modules/gfpgan_model.py
modules/gfpgan_model.py
+1
-4
modules/modelloader.py
modules/modelloader.py
+1
-2
modules/sd_models.py
modules/sd_models.py
+1
-2
modules/textual_inversion/autocrop.py
modules/textual_inversion/autocrop.py
+1
-2
未找到文件。
modules/codeformer_model.py
浏览文件 @
165ab44f
...
...
@@ -20,9 +20,7 @@ codeformer = None
def
setup_model
(
dirname
):
global
model_path
if
not
os
.
path
.
exists
(
model_path
):
os
.
makedirs
(
model_path
)
os
.
makedirs
(
model_path
,
exist_ok
=
True
)
path
=
modules
.
paths
.
paths
.
get
(
"CodeFormer"
,
None
)
if
path
is
None
:
...
...
modules/extensions.py
浏览文件 @
165ab44f
...
...
@@ -7,8 +7,7 @@ from modules.paths_internal import extensions_dir, extensions_builtin_dir, scrip
extensions
=
[]
if
not
os
.
path
.
exists
(
extensions_dir
):
os
.
makedirs
(
extensions_dir
)
os
.
makedirs
(
extensions_dir
,
exist_ok
=
True
)
def
active
():
...
...
modules/gfpgan_model.py
浏览文件 @
165ab44f
...
...
@@ -70,11 +70,8 @@ gfpgan_constructor = None
def
setup_model
(
dirname
):
global
model_path
if
not
os
.
path
.
exists
(
model_path
):
os
.
makedirs
(
model_path
)
try
:
os
.
makedirs
(
model_path
,
exist_ok
=
True
)
from
gfpgan
import
GFPGANer
from
facexlib
import
detection
,
parsing
# noqa: F401
global
user_path
...
...
modules/modelloader.py
浏览文件 @
165ab44f
...
...
@@ -95,8 +95,7 @@ def cleanup_models():
def
move_files
(
src_path
:
str
,
dest_path
:
str
,
ext_filter
:
str
=
None
):
try
:
if
not
os
.
path
.
exists
(
dest_path
):
os
.
makedirs
(
dest_path
)
os
.
makedirs
(
dest_path
,
exist_ok
=
True
)
if
os
.
path
.
exists
(
src_path
):
for
file
in
os
.
listdir
(
src_path
):
fullpath
=
os
.
path
.
join
(
src_path
,
file
)
...
...
modules/sd_models.py
浏览文件 @
165ab44f
...
...
@@ -95,8 +95,7 @@ except Exception:
def
setup_model
():
if
not
os
.
path
.
exists
(
model_path
):
os
.
makedirs
(
model_path
)
os
.
makedirs
(
model_path
,
exist_ok
=
True
)
enable_midas_autodownload
()
...
...
modules/textual_inversion/autocrop.py
浏览文件 @
165ab44f
...
...
@@ -298,8 +298,7 @@ def download_and_cache_models(dirname):
download_url
=
'https://github.com/opencv/opencv_zoo/blob/91fb0290f50896f38a0ab1e558b74b16bc009428/models/face_detection_yunet/face_detection_yunet_2022mar.onnx?raw=true'
model_file_name
=
'face_detection_yunet.onnx'
if
not
os
.
path
.
exists
(
dirname
):
os
.
makedirs
(
dirname
)
os
.
makedirs
(
dirname
,
exist_ok
=
True
)
cache_file
=
os
.
path
.
join
(
dirname
,
model_file_name
)
if
not
os
.
path
.
exists
(
cache_file
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录