mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Increase ema feedback amount. Normalize the dfe 4 image embeds
This commit is contained in:
@@ -137,7 +137,8 @@ class ExponentialMovingAverage:
|
||||
|
||||
update_param = False
|
||||
if self.use_feedback:
|
||||
param_float.add_(tmp)
|
||||
# make feedback 10x decay
|
||||
param_float.add_(tmp * 10)
|
||||
update_param = True
|
||||
|
||||
if self.param_multiplier != 1.0:
|
||||
|
||||
@@ -469,8 +469,9 @@ class DiffusionFeatureExtractor4(nn.Module):
|
||||
)
|
||||
|
||||
# embeds = id_embeds['hidden_states'][-2] # penultimate layer
|
||||
embeds = id_embeds['pooler_output']
|
||||
return embeds
|
||||
image_embeds = id_embeds['pooler_output']
|
||||
image_embeds = image_embeds / image_embeds.norm(p=2, dim=-1, keepdim=True)
|
||||
return image_embeds
|
||||
|
||||
def forward(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user