Commit c3c88ca8 authored by hako-mikan's avatar hako-mikan Committed by GitHub

Update sd_hijack_clip.py

parent 6b3f7039
...@@ -279,7 +279,7 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module): ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment