diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 12:07:10 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 12:07:10 +0000 |
commit | dfd6ea3fcaf2eb701af61136a290132303a729d5 (patch) | |
tree | 6e2f38010d4cd8654f18b02c304370ec7f717202 /modules/sd_samplers_cfg_denoiser.py | |
parent | d02c4da483a656331f641224fe5da5f694580066 (diff) | |
download | stable-diffusion-webui-gfx803-dfd6ea3fcaf2eb701af61136a290132303a729d5.tar.gz stable-diffusion-webui-gfx803-dfd6ea3fcaf2eb701af61136a290132303a729d5.tar.bz2 stable-diffusion-webui-gfx803-dfd6ea3fcaf2eb701af61136a290132303a729d5.zip |
ditch --always-batch-cond-uncond in favor of an UI setting
Diffstat (limited to 'modules/sd_samplers_cfg_denoiser.py')
-rw-r--r-- | modules/sd_samplers_cfg_denoiser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sd_samplers_cfg_denoiser.py b/modules/sd_samplers_cfg_denoiser.py index bc9b97e4..b8101d38 100644 --- a/modules/sd_samplers_cfg_denoiser.py +++ b/modules/sd_samplers_cfg_denoiser.py @@ -165,7 +165,7 @@ class CFGDenoiser(torch.nn.Module): else:
cond_in = catenate_conds([tensor, uncond])
- if shared.batch_cond_uncond:
+ if shared.opts.batch_cond_uncond:
x_out = self.inner_model(x_in, sigma_in, cond=make_condition_dict(cond_in, image_cond_in))
else:
x_out = torch.zeros_like(x_in)
@@ -175,7 +175,7 @@ class CFGDenoiser(torch.nn.Module): x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict(subscript_cond(cond_in, a, b), image_cond_in[a:b]))
else:
x_out = torch.zeros_like(x_in)
- batch_size = batch_size*2 if shared.batch_cond_uncond else batch_size
+ batch_size = batch_size*2 if shared.opts.batch_cond_uncond else batch_size
for batch_offset in range(0, tensor.shape[0], batch_size):
a = batch_offset
b = min(a + batch_size, tensor.shape[0])
|