Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
3665551b
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
11 个月 前同步成功
通知
1754
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
3665551b
编写于
9月 30, 2022
作者:
D
d8ahazard
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/d8ahazard/stable-diffusion-webui
上级
8f1d412e
2162be51
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
11 deletion
+18
-11
embeddings/Place Textual Inversion embeddings here.txt
embeddings/Place Textual Inversion embeddings here.txt
+0
-0
modules/bsrgan_model.py
modules/bsrgan_model.py
+1
-1
modules/images.py
modules/images.py
+10
-8
modules/sd_hijack.py
modules/sd_hijack.py
+6
-1
modules/ui.py
modules/ui.py
+1
-1
未找到文件。
embeddings/Place Textual Inversion embeddings here.txt
0 → 100644
浏览文件 @
3665551b
modules/bsrgan_model.py
浏览文件 @
3665551b
...
...
@@ -67,7 +67,7 @@ class UpscalerBSRGAN(modules.upscaler.Upscaler):
else
:
filename
=
path
if
not
os
.
path
.
exists
(
filename
)
or
filename
is
None
:
print
(
"Unable to load %s from %s"
%
(
self
.
model_path
,
filename
)
)
print
(
f
"BSRGAN: Unable to load model from
{
filename
}
"
,
file
=
sys
.
stderr
)
return
None
print
(
"Loading %s from %s"
%
(
self
.
model_path
,
filename
))
model
=
RRDBNet
(
in_nc
=
3
,
out_nc
=
3
,
nf
=
64
,
nb
=
23
,
gc
=
32
,
sf
=
4
)
# define network
...
...
modules/images.py
浏览文件 @
3665551b
...
...
@@ -213,17 +213,19 @@ def resize_image(resize_mode, im, width, height):
if
opts
.
upscaler_for_img2img
is
None
or
opts
.
upscaler_for_img2img
==
"None"
or
im
.
mode
==
'L'
:
return
im
.
resize
((
w
,
h
),
resample
=
LANCZOS
)
upscalers
=
[
x
for
x
in
shared
.
sd_upscalers
if
x
.
name
==
opts
.
upscaler_for_img2img
]
assert
len
(
upscalers
)
>
0
,
f
"could not find upscaler named
{
opts
.
upscaler_for_img2img
}
"
upscaler
=
upscalers
[
0
]
scale
=
max
(
w
/
im
.
width
,
h
/
im
.
height
)
upscaled
=
upscaler
.
scaler
.
upscale
(
im
,
scale
,
upscaler
.
data_path
)
if
upscaled
.
width
!=
w
or
upscaled
.
height
!=
h
:
upscaled
=
im
.
resize
((
w
,
h
),
resample
=
LANCZOS
)
if
scale
>
1.0
:
upscalers
=
[
x
for
x
in
shared
.
sd_upscalers
if
x
.
name
==
opts
.
upscaler_for_img2img
]
assert
len
(
upscalers
)
>
0
,
f
"could not find upscaler named
{
opts
.
upscaler_for_img2img
}
"
upscaler
=
upscalers
[
0
]
im
=
upscaler
.
scaler
.
upscale
(
im
,
scale
,
upscaler
.
data_path
)
if
im
.
width
!=
w
or
im
.
height
!=
h
:
im
=
im
.
resize
((
w
,
h
),
resample
=
LANCZOS
)
return
upscaled
return
im
if
resize_mode
==
0
:
res
=
resize
(
im
,
width
,
height
)
...
...
modules/sd_hijack.py
浏览文件 @
3665551b
...
...
@@ -232,7 +232,12 @@ class StableDiffusionModelHijack:
for
fn
in
os
.
listdir
(
dirname
):
try
:
process_file
(
os
.
path
.
join
(
dirname
,
fn
),
fn
)
fullfn
=
os
.
path
.
join
(
dirname
,
fn
)
if
os
.
stat
(
fullfn
).
st_size
==
0
:
continue
process_file
(
fullfn
,
fn
)
except
Exception
:
print
(
f
"Error loading emedding
{
fn
}
:"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
...
...
modules/ui.py
浏览文件 @
3665551b
...
...
@@ -599,7 +599,7 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo, run_modelmerger):
mask_mode
=
gr
.
Radio
(
label
=
"Mask mode"
,
show_label
=
False
,
choices
=
[
"Draw mask"
,
"Upload mask"
],
type
=
"index"
,
value
=
"Draw mask"
,
elem_id
=
"mask_mode"
)
inpainting_mask_invert
=
gr
.
Radio
(
label
=
'Masking mode'
,
show_label
=
False
,
choices
=
[
'Inpaint masked'
,
'Inpaint not masked'
],
value
=
'Inpaint masked'
,
type
=
"index"
)
inpainting_fill
=
gr
.
Radio
(
label
=
'Masked content'
,
choices
=
[
'fill'
,
'original'
,
'latent noise'
,
'latent nothing'
],
value
=
'
fil
l'
,
type
=
"index"
)
inpainting_fill
=
gr
.
Radio
(
label
=
'Masked content'
,
choices
=
[
'fill'
,
'original'
,
'latent noise'
,
'latent nothing'
],
value
=
'
origina
l'
,
type
=
"index"
)
with
gr
.
Row
():
inpaint_full_res
=
gr
.
Checkbox
(
label
=
'Inpaint at full resolution'
,
value
=
False
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录