From d8a51f34fd15dc4fbbe4e8416cd3270f23818c09 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Fri, 26 Apr 2024 07:11:07 -0400 Subject: [PATCH] Set `max_train_steps` to 0 if not specified in older `.json` config files --- .release | 2 +- README.md | 5 +++++ kohya_gui/common_gui.py | 2 +- test/config/dreambooth-AdamW8bit.json | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.release b/.release index 8603b5d5d..e7088bda7 100644 --- a/.release +++ b/.release @@ -1 +1 @@ -v24.0.7 \ No newline at end of file +v24.0.8 \ No newline at end of file diff --git a/README.md b/README.md index 0880392ac..528be4bc2 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ The GUI allows you to set the training parameters and generate and run the requi - [SDXL training](#sdxl-training) - [Masked loss](#masked-loss) - [Change History](#change-history) + - [2024/04/26 (v24.0.8)](#20240426-v2408) - [2024/04/25 (v24.0.7)](#20240425-v2407) - [2024/04/22 (v24.0.6)](#20240422-v2406) - [2024/04/19 (v24.0.5)](#20240419-v2405) @@ -453,6 +454,10 @@ ControlNet dataset is used to specify the mask. The mask images should be the RG ## Change History +### 2024/04/26 (v24.0.8) + +- Set `max_train_steps` to 0 if not specified in older `.json` config files. + ### 2024/04/25 (v24.0.7) - Prevent crash if tkinter is not installed diff --git a/kohya_gui/common_gui.py b/kohya_gui/common_gui.py index 2876ab7ae..12947b0a8 100644 --- a/kohya_gui/common_gui.py +++ b/kohya_gui/common_gui.py @@ -364,7 +364,7 @@ def update_my_data(my_data): my_data[key] = int(value) except ValueError: # Handle the case where the string is not a valid float - my_data[key] = int(1600) + my_data[key] = int(0) # Convert values to int if they are strings for key in ["max_token_length"]: diff --git a/test/config/dreambooth-AdamW8bit.json b/test/config/dreambooth-AdamW8bit.json index 48794323e..51f0962d1 100644 --- a/test/config/dreambooth-AdamW8bit.json +++ b/test/config/dreambooth-AdamW8bit.json @@ -53,7 +53,7 @@ "max_timestep": 1000, "max_token_length": 75, "max_train_epochs": 0, - "max_train_steps": 0, + "max_train_steps": "", "mem_eff_attn": false, "min_bucket_reso": 256, "min_snr_gamma": 0,