Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
c40be225
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
12 个月 前同步成功
通知
1771
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
c40be225
编写于
11月 17, 2023
作者:
A
aria1th
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix critical issue - unet apply
上级
472c22cc
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
4 addition
and
4 deletion
+4
-4
modules/processing.py
modules/processing.py
+4
-4
未找到文件。
modules/processing.py
浏览文件 @
c40be225
...
@@ -874,7 +874,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
...
@@ -874,7 +874,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
else
:
else
:
if
opts
.
sd_vae_decode_method
!=
'Full'
:
if
opts
.
sd_vae_decode_method
!=
'Full'
:
p
.
extra_generation_params
[
'VAE Decoder'
]
=
opts
.
sd_vae_decode_method
p
.
extra_generation_params
[
'VAE Decoder'
]
=
opts
.
sd_vae_decode_method
with
hypertile_context_unet
(
p
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
p
.
width
/
p
.
height
,
tile_size
=
largest_tile_size_available
(
p
.
width
,
p
.
height
),
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
p
.
sd_model
.
model
,
aspect_ratio
=
p
.
width
/
p
.
height
,
tile_size
=
largest_tile_size_available
(
p
.
width
,
p
.
height
),
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
x_samples_ddim
=
decode_latent_batch
(
p
.
sd_model
,
samples_ddim
,
target_device
=
devices
.
cpu
,
check_for_nans
=
True
)
x_samples_ddim
=
decode_latent_batch
(
p
.
sd_model
,
samples_ddim
,
target_device
=
devices
.
cpu
,
check_for_nans
=
True
)
x_samples_ddim
=
torch
.
stack
(
x_samples_ddim
).
float
()
x_samples_ddim
=
torch
.
stack
(
x_samples_ddim
).
float
()
...
@@ -1145,7 +1145,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -1145,7 +1145,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
x
=
self
.
rng
.
next
()
x
=
self
.
rng
.
next
()
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
devices
.
torch_gc
()
devices
.
torch_gc
()
samples
=
self
.
sampler
.
sample
(
self
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
txt2img_image_conditioning
(
x
))
samples
=
self
.
sampler
.
sample
(
self
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
txt2img_image_conditioning
(
x
))
del
x
del
x
...
@@ -1247,7 +1247,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -1247,7 +1247,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
tile_size
=
largest_tile_size_available
(
target_width
,
target_height
)
tile_size
=
largest_tile_size_available
(
target_width
,
target_height
)
aspect_ratio
=
self
.
width
/
self
.
height
aspect_ratio
=
self
.
width
/
self
.
height
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
samples
=
self
.
sampler
.
sample_img2img
(
self
,
samples
,
noise
,
self
.
hr_c
,
self
.
hr_uc
,
steps
=
self
.
hr_second_pass_steps
or
self
.
steps
,
image_conditioning
=
image_conditioning
)
samples
=
self
.
sampler
.
sample_img2img
(
self
,
samples
,
noise
,
self
.
hr_c
,
self
.
hr_uc
,
steps
=
self
.
hr_second_pass_steps
or
self
.
steps
,
image_conditioning
=
image_conditioning
)
sd_models
.
apply_token_merging
(
self
.
sd_model
,
self
.
get_token_merging_ratio
())
sd_models
.
apply_token_merging
(
self
.
sd_model
,
self
.
get_token_merging_ratio
())
...
@@ -1535,7 +1535,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
...
@@ -1535,7 +1535,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
aspect_ratio
=
self
.
width
/
self
.
height
aspect_ratio
=
self
.
width
/
self
.
height
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
devices
.
torch_gc
()
devices
.
torch_gc
()
samples
=
self
.
sampler
.
sample_img2img
(
self
,
self
.
init_latent
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
image_conditioning
)
samples
=
self
.
sampler
.
sample_img2img
(
self
,
self
.
init_latent
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
image_conditioning
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录