From 7c190edef8bf4e9207fb7e91d39b360e39c1e8fe Mon Sep 17 00:00:00 2001 From: bmaltais Date: Thu, 12 Sep 2024 07:03:45 -0400 Subject: [PATCH] Fix issue with new text_encoder_lr parameter syntax --- kohya_gui/lora_gui.py | 8 ++++---- sd-scripts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kohya_gui/lora_gui.py b/kohya_gui/lora_gui.py index 0ed2a184..6614cf0d 100644 --- a/kohya_gui/lora_gui.py +++ b/kohya_gui/lora_gui.py @@ -1257,14 +1257,14 @@ def train_model( log.error("When specifying T5XXL learning rate, text encoder learning rate need to be a value greater than 0.") return TRAIN_BUTTON_VISIBLE - text_encoder_lr_str = "" + text_encoder_lr_list = [] if text_encoder_lr > 0 and t5xxl_lr > 0: # Set the text_encoder_lr to a combination of text_encoder_lr and t5xxl_lr - text_encoder_lr_str = f"{text_encoder_lr} {t5xxl_lr}" + text_encoder_lr_list = [float(text_encoder_lr), float(t5xxl_lr)] elif text_encoder_lr > 0: # Set the text_encoder_lr to text_encoder_lr only - text_encoder_lr_str = f"{text_encoder_lr}" + text_encoder_lr_list = [float(text_encoder_lr), float(text_encoder_lr)] # Convert learning rates to float once and store the result for re-use learning_rate = float(learning_rate) if learning_rate is not None else 0.0 @@ -1444,7 +1444,7 @@ def train_model( "stop_text_encoder_training": ( stop_text_encoder_training if stop_text_encoder_training != 0 else None ), - "text_encoder_lr": text_encoder_lr_str if not 0 else None, + "text_encoder_lr": text_encoder_lr_list if not [] else None, "train_batch_size": train_batch_size, "train_data_dir": train_data_dir, "training_comment": training_comment, diff --git a/sd-scripts b/sd-scripts index 237317ff..cefe5262 160000 --- a/sd-scripts +++ b/sd-scripts @@ -1 +1 @@ -Subproject commit 237317fffd060bcfb078b770ccd2df18bc4dd3a6 +Subproject commit cefe52629e1901dd8192b0487afd5e9f089e3519