Skip to content

Commit

Permalink
Set max_train_steps to 0 if not specified in older .json config f…
Browse files Browse the repository at this point in the history
…iles
  • Loading branch information
bmaltais committed Apr 26, 2024
1 parent 9ab31dc commit d8a51f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v24.0.7
v24.0.8
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down
2 changes: 1 addition & 1 deletion test/config/dreambooth-AdamW8bit.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d8a51f3

Please sign in to comment.