Skip to content

Commit

Permalink
Merge pull request #2239 from bmaltais/fix-dataset-prep
Browse files Browse the repository at this point in the history
Fix dataset preparation
  • Loading branch information
bmaltais authored Apr 9, 2024
2 parents 01a6f46 + 9ac4e92 commit 9493d6e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.1.2
v23.1.3
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,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/08 (v23.1.3)](#20240408-v2313)
- [2024/04/08 (v23.1.2)](#20240408-v2312)
- [2024/04/07 (v23.1.1)](#20240407-v2311)
- [2024/04/07 (v23.1.0)](#20240407-v2310)
Expand Down Expand Up @@ -405,6 +406,10 @@ ControlNet dataset is used to specify the mask. The mask images should be the RG
## Change History
### 2024/04/08 (v23.1.3)
- Fix dataset preparation bug.
### 2024/04/08 (v23.1.2)
- Added config.toml support for wd14_caption.
Expand Down
24 changes: 19 additions & 5 deletions kohya_gui/dreambooth_folder_creation_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


def copy_info_to_Folders_tab(training_folder):
img_folder = os.path.join(training_folder, "img")
img_folder = gr.Dropdown(value=os.path.join(training_folder, "img"))
if os.path.exists(os.path.join(training_folder, "reg")):
reg_folder = os.path.join(training_folder, "reg")
reg_folder = gr.Dropdown(value=os.path.join(training_folder, "reg"))
else:
reg_folder = ""
model_folder = os.path.join(training_folder, "model")
log_folder = os.path.join(training_folder, "log")
reg_folder = gr.Dropdown(value="")
model_folder = gr.Dropdown(value=os.path.join(training_folder, "model"))
log_folder = gr.Dropdown(value=os.path.join(training_folder, "log"))

return img_folder, reg_folder, model_folder, log_folder

Expand Down Expand Up @@ -293,3 +293,17 @@ def list_train_output_dirs(path):
],
show_progress=False,
)


button_copy_info_to_Folders_tab = gr.Button('Copy info to respective fields')
button_copy_info_to_Folders_tab.click(
copy_info_to_Folders_tab,
inputs=[util_training_dir_output],
outputs=[
train_data_dir_input,
reg_data_dir_input,
output_dir_input,
logging_dir_input,
],
show_progress=False,
)

0 comments on commit 9493d6e

Please sign in to comment.