Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
0b8ca64a
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
11 个月 前同步成功
通知
1771
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
0b8ca64a
编写于
9月 01, 2022
作者:
A
AUTOMATIC
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
applied workaround for gradio 3.2
上级
8d45b3be
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
14 deletion
+18
-14
requirements.txt
requirements.txt
+1
-1
webui.py
webui.py
+17
-13
未找到文件。
requirements.txt
浏览文件 @
0b8ca64a
basicsr
gfpgan
gradio
==3.1.5
gradio
numpy
Pillow
realesrgan
...
...
webui.py
浏览文件 @
0b8ca64a
...
...
@@ -80,6 +80,10 @@ batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram o
queue_lock
=
threading
.
Lock
()
def
gr_show
(
visible
=
True
):
return
{
"visible"
:
visible
,
"__type__"
:
"update"
}
class
State
:
interrupted
=
False
job
=
""
...
...
@@ -1132,7 +1136,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
# we manually generate all input noises because each one should have a specific seed
x
=
create_random_tensors
([
opt_C
,
p
.
height
//
opt_f
,
p
.
width
//
opt_f
],
seeds
=
seeds
)
if
p
.
n_iter
>
0
:
if
p
.
n_iter
>
1
:
state
.
job
=
f
"Batch
{
n
+
1
}
out of
{
p
.
n_iter
}
"
samples_ddim
=
p
.
sample
(
x
=
x
,
conditioning
=
c
,
unconditional_conditioning
=
uc
)
...
...
@@ -1728,16 +1732,16 @@ with gr.Blocks(analytics_enabled=False) as img2img_interface:
is_upscale
=
mode
==
3
return
{
init_img
:
gr
.
update
(
visible
=
not
is_inpaint
),
init_img_with_mask
:
gr
.
update
(
visible
=
is_inpaint
),
mask_blur
:
gr
.
update
(
visible
=
is_inpaint
),
inpainting_fill
:
gr
.
update
(
visible
=
is_inpaint
),
prompt_matrix
:
gr
.
update
(
visible
=
is_classic
),
batch_count
:
gr
.
update
(
visible
=
not
is_upscale
),
batch_size
:
gr
.
update
(
visible
=
not
is_loopback
),
sd_upscale_upscaler_name
:
gr
.
update
(
visible
=
is_upscale
),
sd_upscale_overlap
:
gr
.
Slider
.
update
(
visible
=
is_upscale
),
inpaint_full_res
:
gr
.
update
(
visible
=
is_inpaint
),
init_img
:
gr
_show
(
not
is_inpaint
),
init_img_with_mask
:
gr
_show
(
is_inpaint
),
mask_blur
:
gr
_show
(
is_inpaint
),
inpainting_fill
:
gr
_show
(
is_inpaint
),
prompt_matrix
:
gr
_show
(
is_classic
),
batch_count
:
gr
_show
(
not
is_upscale
),
batch_size
:
gr
_show
(
not
is_loopback
),
sd_upscale_upscaler_name
:
gr
_show
(
is_upscale
),
sd_upscale_overlap
:
gr_show
(
is_upscale
),
inpaint_full_res
:
gr
_show
(
is_inpaint
),
}
switch_mode
.
change
(
...
...
@@ -1979,9 +1983,9 @@ sd_model = load_model_from_config(sd_config, cmd_opts.ckpt)
sd_model
=
(
sd_model
if
cmd_opts
.
no_half
else
sd_model
.
half
())
if
cmd_opts
.
lowvram
or
cmd_opts
.
medvram
:
setup_for_low_vram
(
sd_model
)
setup_for_low_vram
(
sd_model
)
else
:
sd_model
=
sd_model
.
to
(
device
)
sd_model
=
sd_model
.
to
(
device
)
model_hijack
=
StableDiffusionModelHijack
()
model_hijack
.
hijack
(
sd_model
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录