Update Utilities logic

This commit is contained in:
bmaltais 2022-12-15 18:34:54 -05:00
parent 515c52e2cf
commit 2f91fd24ae
2 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,4 @@
{
"python.linting.enabled": true
"python.linting.enabled": true,
"python.formatting.provider": "yapf"
}

View File

@ -517,6 +517,7 @@ def dreambooth_folder_preparation(
f"Done creating kohya_ss training folder structure at {util_training_dir_input}..."
)
def copy_info_to_Directories_tab(training_folder):
img_folder = os.path.join(training_folder, "img")
reg_folder = os.path.join(training_folder, "reg")
@ -525,6 +526,7 @@ def copy_info_to_Directories_tab(training_folder):
return img_folder, reg_folder, model_folder, log_folder
css = ""
if os.path.exists("./style.css"):
@ -746,8 +748,7 @@ with interface:
)
util_regularization_images_prompt_input = gr.Textbox(
label="Class prompt",
placeholder=
"Eg: person",
placeholder="Eg: person",
interactive=True,
)
with gr.Row():
@ -811,10 +812,14 @@ with interface:
button_run = gr.Button("Train model")
button_copy_info_to_Directories_tab.click(
copy_info_to_Directories_tab,
inputs=[util_training_dir_input],
outputs=[train_data_dir_input, reg_data_dir_input, output_dir_input, logging_dir_input])
button_copy_info_to_Directories_tab.click(copy_info_to_Directories_tab,
inputs=[util_training_dir_input],
outputs=[
train_data_dir_input,
reg_data_dir_input,
output_dir_input,
logging_dir_input
])
button_open_config.click(
open_configuration,