Fix logic issue for reg images folder creation
This commit is contained in:
parent
42a0732e0d
commit
9b2ff7a8f8
@ -21,6 +21,11 @@ from dreambooth_gui.common_gui import (
|
|||||||
)
|
)
|
||||||
from easygui import filesavebox, msgbox
|
from easygui import filesavebox, msgbox
|
||||||
|
|
||||||
|
folder_symbol = '\U0001f4c2' # 📂
|
||||||
|
refresh_symbol = '\U0001f504' # 🔄
|
||||||
|
save_style_symbol = '\U0001f4be' # 💾
|
||||||
|
document_symbol = '\U0001F4C4' # 📄
|
||||||
|
|
||||||
|
|
||||||
def save_configuration(
|
def save_configuration(
|
||||||
save_as,
|
save_as,
|
||||||
@ -505,6 +510,18 @@ with interface:
|
|||||||
label='Pretrained model name or path',
|
label='Pretrained model name or path',
|
||||||
placeholder='enter the path to custom model or name of pretrained model',
|
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(
|
model_list = gr.Dropdown(
|
||||||
label='(Optional) Model Quick Pick',
|
label='(Optional) Model Quick Pick',
|
||||||
choices=[
|
choices=[
|
||||||
|
@ -7,16 +7,16 @@ def get_folder_path():
|
|||||||
return 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):
|
def remove_doublequote(file_path):
|
||||||
if file_path != None:
|
if file_path != None:
|
||||||
file_path = file_path.replace('"', '')
|
file_path = file_path.replace('"', '')
|
||||||
|
|
||||||
return file_path
|
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
|
|
||||||
|
@ -70,7 +70,7 @@ def dreambooth_folder_preparation(
|
|||||||
|
|
||||||
# Create the regularization_dir path
|
# Create the regularization_dir path
|
||||||
if (
|
if (
|
||||||
not (util_class_prompt_input == '')
|
util_class_prompt_input == ''
|
||||||
or not util_regularization_images_repeat_input > 0
|
or not util_regularization_images_repeat_input > 0
|
||||||
):
|
):
|
||||||
print(
|
print(
|
||||||
|
Loading…
Reference in New Issue
Block a user