diff options
author | Volpeon <git@volpeon.ink> | 2023-04-17 10:46:20 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-04-17 10:46:20 +0200 |
commit | d07364e55483e81603704a978c0050d58d357a77 (patch) | |
tree | 939e8f809f90142ef507fe09ef0a3f08c066a353 /training/strategy | |
parent | Fix (diff) | |
download | textual-inversion-diff-d07364e55483e81603704a978c0050d58d357a77.tar.gz textual-inversion-diff-d07364e55483e81603704a978c0050d58d357a77.tar.bz2 textual-inversion-diff-d07364e55483e81603704a978c0050d58d357a77.zip |
Fix
Diffstat (limited to 'training/strategy')
-rw-r--r-- | training/strategy/ti.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/training/strategy/ti.py b/training/strategy/ti.py index 6bbff64..f330cb7 100644 --- a/training/strategy/ti.py +++ b/training/strategy/ti.py | |||
@@ -119,7 +119,7 @@ def textual_inversion_strategy_callbacks( | |||
119 | ema_embeddings.step(text_encoder.text_model.embeddings.token_embedding.parameters()) | 119 | ema_embeddings.step(text_encoder.text_model.embeddings.token_embedding.parameters()) |
120 | 120 | ||
121 | if use_emb_decay and w is not None: | 121 | if use_emb_decay and w is not None: |
122 | lr = lrs["emb"] or lrs["0"] | 122 | lr = lrs["emb"] if "emb" in lrs else lrs["0"] |
123 | lambda_ = emb_decay * lr | 123 | lambda_ = emb_decay * lr |
124 | 124 | ||
125 | if lambda_ != 0: | 125 | if lambda_ != 0: |