Fix logic issue for reg images folder creation

This commit is contained in:
bmaltais 2022-12-17 09:51:30 -05:00
parent 42a0732e0d
commit 9b2ff7a8f8
3 changed files with 26 additions and 9 deletions

View File

@ -21,6 +21,11 @@ from dreambooth_gui.common_gui import (
)
from easygui import filesavebox, msgbox
folder_symbol = '\U0001f4c2' # 📂
refresh_symbol = '\U0001f504' # 🔄
save_style_symbol = '\U0001f4be' # 💾
document_symbol = '\U0001F4C4' # 📄
def save_configuration(
save_as,
@ -505,6 +510,18 @@ with interface:
label='Pretrained model name or path',
placeholder='enter the path to custom model or name of pretrained model',
)
pretrained_model_name_or_path_fille = gr.Button(
document_symbol, elem_id='open_folder_small'
)
pretrained_model_name_or_path_fille.click(
get_file_path, inputs=[pretrained_model_name_or_path_input], outputs=pretrained_model_name_or_path_input
)
pretrained_model_name_or_path_folder = gr.Button(
folder_symbol, elem_id='open_folder_small'
)
pretrained_model_name_or_path_folder.click(
get_folder_path, outputs=pretrained_model_name_or_path_input
)
model_list = gr.Dropdown(
label='(Optional) Model Quick Pick',
choices=[

View File

@ -7,16 +7,16 @@ def get_folder_path():
return folder_path
def get_file_path(file_path):
file_path = fileopenbox(
'Select the config file to load', default=file_path, filetypes='*.json',
)
return file_path
def remove_doublequote(file_path):
if file_path != None:
file_path = file_path.replace('"', '')
return file_path
def get_file_path(file_path):
file_path = fileopenbox(
'Select the config file to load', default=file_path, filetypes='*.json'
)
return file_path

View File

@ -70,7 +70,7 @@ def dreambooth_folder_preparation(
# Create the regularization_dir path
if (
not (util_class_prompt_input == '')
util_class_prompt_input == ''
or not util_regularization_images_repeat_input > 0
):
print(