From d07364e55483e81603704a978c0050d58d357a77 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 17 Apr 2023 10:46:20 +0200 Subject: Fix --- training/strategy/ti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'training') 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( ema_embeddings.step(text_encoder.text_model.embeddings.token_embedding.parameters()) if use_emb_decay and w is not None: - lr = lrs["emb"] or lrs["0"] + lr = lrs["emb"] if "emb" in lrs else lrs["0"] lambda_ = emb_decay * lr if lambda_ != 0: -- cgit v1.2.3-70-g09d2