Update comment for Pad prompt/negative prompt v0 to add a warning about truncation, make it override the v1 implementation

This commit is contained in:
AUTOMATIC1111
2024-02-17 13:21:08 +03:00
parent 4573195894
commit 4ff1fabc86
2 changed files with 4 additions and 4 deletions

View File

@@ -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: