mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-03-09 23:44:55 +08:00
Update sd_hijack_clip.py
This commit is contained in:
parent
6b3f7039b6
commit
c3c88ca8b4
@ -279,7 +279,7 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module):
|
|||||||
original_mean = z.mean()
|
original_mean = z.mean()
|
||||||
z = z * batch_multipliers.reshape(batch_multipliers.shape + (1,)).expand(z.shape)
|
z = z * batch_multipliers.reshape(batch_multipliers.shape + (1,)).expand(z.shape)
|
||||||
new_mean = z.mean()
|
new_mean = z.mean()
|
||||||
|
|
||||||
if not getattr(opts, "disable_normalize_embeddings", False):
|
if not getattr(opts, "disable_normalize_embeddings", False):
|
||||||
z = z * (original_mean / new_mean)
|
z = z * (original_mean / new_mean)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user