Update Utilities logic
This commit is contained in:
parent
515c52e2cf
commit
2f91fd24ae
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"python.linting.enabled": true
|
"python.linting.enabled": true,
|
||||||
|
"python.formatting.provider": "yapf"
|
||||||
}
|
}
|
@ -517,6 +517,7 @@ def dreambooth_folder_preparation(
|
|||||||
f"Done creating kohya_ss training folder structure at {util_training_dir_input}..."
|
f"Done creating kohya_ss training folder structure at {util_training_dir_input}..."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def copy_info_to_Directories_tab(training_folder):
|
def copy_info_to_Directories_tab(training_folder):
|
||||||
img_folder = os.path.join(training_folder, "img")
|
img_folder = os.path.join(training_folder, "img")
|
||||||
reg_folder = os.path.join(training_folder, "reg")
|
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
|
return img_folder, reg_folder, model_folder, log_folder
|
||||||
|
|
||||||
|
|
||||||
css = ""
|
css = ""
|
||||||
|
|
||||||
if os.path.exists("./style.css"):
|
if os.path.exists("./style.css"):
|
||||||
@ -746,8 +748,7 @@ with interface:
|
|||||||
)
|
)
|
||||||
util_regularization_images_prompt_input = gr.Textbox(
|
util_regularization_images_prompt_input = gr.Textbox(
|
||||||
label="Class prompt",
|
label="Class prompt",
|
||||||
placeholder=
|
placeholder="Eg: person",
|
||||||
"Eg: person",
|
|
||||||
interactive=True,
|
interactive=True,
|
||||||
)
|
)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
@ -811,10 +812,14 @@ with interface:
|
|||||||
|
|
||||||
button_run = gr.Button("Train model")
|
button_run = gr.Button("Train model")
|
||||||
|
|
||||||
button_copy_info_to_Directories_tab.click(
|
button_copy_info_to_Directories_tab.click(copy_info_to_Directories_tab,
|
||||||
copy_info_to_Directories_tab,
|
inputs=[util_training_dir_input],
|
||||||
inputs=[util_training_dir_input],
|
outputs=[
|
||||||
outputs=[train_data_dir_input, reg_data_dir_input, output_dir_input, logging_dir_input])
|
train_data_dir_input,
|
||||||
|
reg_data_dir_input,
|
||||||
|
output_dir_input,
|
||||||
|
logging_dir_input
|
||||||
|
])
|
||||||
|
|
||||||
button_open_config.click(
|
button_open_config.click(
|
||||||
open_configuration,
|
open_configuration,
|
||||||
|
Loading…
Reference in New Issue
Block a user