From 6df6b982f9957af2c3d30c8106e47c35afbf3b41 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Tue, 12 Mar 2024 11:31:47 -0400 Subject: [PATCH 1/2] Fix minor issues --- kohya_gui/convert_lcm_gui.py | 2 +- kohya_gui/extract_lora_gui.py | 2 +- kohya_gui/extract_lycoris_locon_gui.py | 4 ++-- kohya_gui/group_images_gui.py | 2 +- kohya_gui/merge_lora_gui.py | 1 + kohya_gui/merge_lycoris_gui.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kohya_gui/convert_lcm_gui.py b/kohya_gui/convert_lcm_gui.py index 452a7045d..6336a7a05 100644 --- a/kohya_gui/convert_lcm_gui.py +++ b/kohya_gui/convert_lcm_gui.py @@ -32,7 +32,7 @@ def convert_lcm( # Check if source model exist if not os.path.isfile(model_path): - msgbox('The provided DyLoRA model is not a file') + log.error('The provided DyLoRA model is not a file') return if os.path.dirname(name) == "": diff --git a/kohya_gui/extract_lora_gui.py b/kohya_gui/extract_lora_gui.py index b91cde7ee..bc6b1c170 100644 --- a/kohya_gui/extract_lora_gui.py +++ b/kohya_gui/extract_lora_gui.py @@ -241,7 +241,7 @@ def change_sdxl(sdxl): show_progress=False, ) model_org.change( - fn=lambda path: gr.Dropdown().update(choices=[""] + list_org_model(path)), + fn=lambda path: gr.Dropdown().update(choices=[""] + list_org_models(path)), inputs=model_org, outputs=model_org, show_progress=False, diff --git a/kohya_gui/extract_lycoris_locon_gui.py b/kohya_gui/extract_lycoris_locon_gui.py index 647363a17..feb00ce36 100644 --- a/kohya_gui/extract_lycoris_locon_gui.py +++ b/kohya_gui/extract_lycoris_locon_gui.py @@ -74,7 +74,7 @@ def extract_lycoris_locon( path, ext = os.path.splitext(output_name) output_name = f"{path}_tmp{ext}" - run_cmd = fr'"{PYTHON}" "{scriptdir}/sd-scripts/tools/lycoris_locon_extract.py"' + run_cmd = fr'"{PYTHON}" "{scriptdir}/tools/lycoris_locon_extract.py"' if is_sdxl: run_cmd += f" --is_sdxl" if is_v2: @@ -258,7 +258,7 @@ def list_save_to(path): show_progress=False, ) base_model.change( - fn=lambda path: gr.Dropdown().update(choices=[""] + list_base_model(path)), + fn=lambda path: gr.Dropdown().update(choices=[""] + list_base_models(path)), inputs=base_model, outputs=base_model, show_progress=False, diff --git a/kohya_gui/group_images_gui.py b/kohya_gui/group_images_gui.py index f66d9f7f6..a3420bc92 100644 --- a/kohya_gui/group_images_gui.py +++ b/kohya_gui/group_images_gui.py @@ -102,7 +102,7 @@ def list_output_dirs(path): value="", allow_custom_value=True, ) - create_refresh_button(output_folder, lambda: None, lambda: {"choices": list_output_dirs(current_output_dir)},"open_folder_small") + create_refresh_button(output_folder, lambda: None, lambda: {"choices": list_output_dirs(current_output_folder)},"open_folder_small") button_output_folder = gr.Button( '📂', elem_id='open_folder_small', elem_classes=['tool'], visible=(not headless) ) diff --git a/kohya_gui/merge_lora_gui.py b/kohya_gui/merge_lora_gui.py index 53f1baeb6..5d949ab26 100644 --- a/kohya_gui/merge_lora_gui.py +++ b/kohya_gui/merge_lora_gui.py @@ -2,6 +2,7 @@ import os import subprocess import sys +import json # Third-party imports import gradio as gr diff --git a/kohya_gui/merge_lycoris_gui.py b/kohya_gui/merge_lycoris_gui.py index 38978defa..317f815ec 100644 --- a/kohya_gui/merge_lycoris_gui.py +++ b/kohya_gui/merge_lycoris_gui.py @@ -141,7 +141,7 @@ def list_save_to(path): show_progress=False, ) lycoris_model.change( - fn=lambda path: gr.Dropdown().update(choices=[""] + list_lycoris_models(path)), + fn=lambda path: gr.Dropdown().update(choices=[""] + list_lycoris_model(path)), inputs=lycoris_model, outputs=lycoris_model, show_progress=False, From ab32d02ee8d7c662828cf8560cc66ade24ea9cf0 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Tue, 12 Mar 2024 11:33:16 -0400 Subject: [PATCH 2/2] v23.0.7 --- .release | 2 +- README.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.release b/.release index 0f75ce3fa..4c43b882a 100644 --- a/.release +++ b/.release @@ -1 +1 @@ -v23.0.6 \ No newline at end of file +v23.0.7 \ No newline at end of file diff --git a/README.md b/README.md index c1ce4299f..8e6dc619a 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,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/11 (v23.0.7)](#20240311-v2307) - [2024/03/11 (v23.0.6)](#20240311-v2306) - [2024/03/11 (v23.0.5)](#20240311-v2305) - [2024/03/10 (v23.0.4)](#20240310-v2304) @@ -365,6 +366,10 @@ The documentation in this section will be moved to a separate document later. ## Change History +### 2024/03/11 (v23.0.7) + +- Fix minor issues related to functions and file path + ### 2024/03/11 (v23.0.6) - Fix issue with PYTHON path that have "spaces" in them