From c96cdf20aeba91fc776ac47659b22af6e459f749 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Tue, 19 Mar 2024 12:52:42 -0400 Subject: [PATCH] v23.0.13 --- .release | 2 +- README.md | 5 +++++ kohya_gui/class_sample_images.py | 12 +++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.release b/.release index 6c0733cc4..701fb6db5 100644 --- a/.release +++ b/.release @@ -1 +1 @@ -v23.0.12 \ No newline at end of file +v23.0.13 \ No newline at end of file diff --git a/README.md b/README.md index 2aa1e0085..604d69688 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ The GUI allows you to set the training parameters and generate and run the requi - [No module called tkinter](#no-module-called-tkinter) - [SDXL training](#sdxl-training) - [Change History](#change-history) + - [2024/03/13 (v23.0.13)](#20240313-v23013) - [2024/03/16 (v23.0.12)](#20240316-v23012) - [New Features \& Improvements](#new-features--improvements) - [Software Updates](#software-updates) @@ -379,6 +380,10 @@ The documentation in this section will be moved to a separate document later. ## Change History +### 2024/03/13 (v23.0.13) + +- Fix issue with image samples. + ### 2024/03/16 (v23.0.12) #### New Features & Improvements diff --git a/kohya_gui/class_sample_images.py b/kohya_gui/class_sample_images.py index 0410244d6..4f22c6320 100644 --- a/kohya_gui/class_sample_images.py +++ b/kohya_gui/class_sample_images.py @@ -43,7 +43,13 @@ def run_cmd_sample( run_cmd = '' - if sample_every_n_epochs == sample_every_n_steps == '0': + if sample_every_n_epochs is None: + sample_every_n_epochs = 0 + + if sample_every_n_steps is None: + sample_every_n_steps = 0 + + if sample_every_n_epochs == sample_every_n_steps == 0: return run_cmd # Create the prompt file and get its path @@ -55,10 +61,10 @@ def run_cmd_sample( run_cmd += f' --sample_sampler={sample_sampler}' run_cmd += f' --sample_prompts="{sample_prompts_path}"' - if sample_every_n_epochs != '0': + if sample_every_n_epochs != 0: run_cmd += f' --sample_every_n_epochs={sample_every_n_epochs}' - if sample_every_n_steps != '0': + if sample_every_n_steps != 0: run_cmd += f' --sample_every_n_steps={sample_every_n_steps}' return run_cmd