mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-04 08:11:43 -08:00
fix CLIP doing the unneeded normalization
revert SD2.1 back to use the original repo add SDXL's force_zero_embeddings to negative prompt
This commit is contained in:
parent
21aec6f567
commit
594c8e7b26
6 changed files with 29 additions and 8 deletions
|
|
@ -22,7 +22,8 @@ def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch:
|
|||
"target_size_as_tuple": torch.tensor([height, width]).repeat(len(batch), 1).to(devices.device, devices.dtype),
|
||||
}
|
||||
|
||||
c = self.conditioner(sdxl_conds)
|
||||
force_zero_negative_prompt = getattr(batch, 'is_negative_prompt', False) and all(x == '' for x in batch)
|
||||
c = self.conditioner(sdxl_conds, force_zero_embeddings=['txt'] if force_zero_negative_prompt else [])
|
||||
|
||||
return c
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue