aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_samplers_cfg_denoiser.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-02-17 10:21:08 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2024-02-17 10:21:37 +0000
commit3345218439ab0e74e2b6ea6e9d6291885a6e8fb5 (patch)
tree404c4cb644f2f2432229872d944587ac9fee7988 /modules/sd_samplers_cfg_denoiser.py
parent4652fc5ac36df57add76aa2b012a2d7da57963dd (diff)
downloadstable-diffusion-webui-gfx803-3345218439ab0e74e2b6ea6e9d6291885a6e8fb5.tar.gz
stable-diffusion-webui-gfx803-3345218439ab0e74e2b6ea6e9d6291885a6e8fb5.tar.bz2
stable-diffusion-webui-gfx803-3345218439ab0e74e2b6ea6e9d6291885a6e8fb5.zip
Update comment for Pad prompt/negative prompt v0 to add a warning about truncation, make it override the v1 implementation
Diffstat (limited to 'modules/sd_samplers_cfg_denoiser.py')
-rw-r--r--modules/sd_samplers_cfg_denoiser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/sd_samplers_cfg_denoiser.py b/modules/sd_samplers_cfg_denoiser.py
index 941dff4b..a73d3b03 100644
--- a/modules/sd_samplers_cfg_denoiser.py
+++ b/modules/sd_samplers_cfg_denoiser.py
@@ -220,10 +220,10 @@ class CFGDenoiser(torch.nn.Module):
self.padded_cond_uncond = False
self.padded_cond_uncond_v0 = False
- if shared.opts.pad_cond_uncond and tensor.shape[1] != uncond.shape[1]:
- tensor, uncond = self.pad_cond_uncond(tensor, uncond)
- elif shared.opts.pad_cond_uncond_v0 and tensor.shape[1] != uncond.shape[1]:
+ if shared.opts.pad_cond_uncond_v0 and tensor.shape[1] != uncond.shape[1]:
tensor, uncond = self.pad_cond_uncond_v0(tensor, uncond)
+ elif shared.opts.pad_cond_uncond and tensor.shape[1] != uncond.shape[1]:
+ tensor, uncond = self.pad_cond_uncond(tensor, uncond)
if tensor.shape[1] == uncond.shape[1] or skip_uncond:
if is_edit_model: