v21.0.1
This commit is contained in:
parent
1e3055c895
commit
7f0e5683c6
@ -163,6 +163,9 @@ This will store your a backup file with your current locally installed pip packa
|
|||||||
|
|
||||||
## Change History
|
## Change History
|
||||||
|
|
||||||
|
* 2023/03/01 (v21.0.1):
|
||||||
|
- Add warning to tensorboard start if the log information is missing
|
||||||
|
- Fix issue with 8bitadam on older config file load
|
||||||
* 2023/02/27 (v21.0.0):
|
* 2023/02/27 (v21.0.0):
|
||||||
- Add tensorboard start and stop support to the GUI
|
- Add tensorboard start and stop support to the GUI
|
||||||
* 2023/02/26 (v20.8.2):
|
* 2023/02/26 (v20.8.2):
|
||||||
|
@ -25,6 +25,7 @@ from library.common_gui import (
|
|||||||
gradio_config,
|
gradio_config,
|
||||||
gradio_source_model,
|
gradio_source_model,
|
||||||
set_legacy_8bitadam,
|
set_legacy_8bitadam,
|
||||||
|
update_optimizer,
|
||||||
)
|
)
|
||||||
from library.tensorboard_gui import (
|
from library.tensorboard_gui import (
|
||||||
gradio_tensorboard,
|
gradio_tensorboard,
|
||||||
@ -208,6 +209,8 @@ def open_configuration(
|
|||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
my_data_db = json.load(f)
|
my_data_db = json.load(f)
|
||||||
print('Loading config...')
|
print('Loading config...')
|
||||||
|
# Update values to fix deprecated use_8bit_adam checkbox and set appropriate optimizer if it is set to True
|
||||||
|
my_data = update_optimizer(my_data)
|
||||||
else:
|
else:
|
||||||
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
||||||
my_data_db = {}
|
my_data_db = {}
|
||||||
|
@ -19,6 +19,7 @@ from library.common_gui import (
|
|||||||
color_aug_changed,
|
color_aug_changed,
|
||||||
run_cmd_training,
|
run_cmd_training,
|
||||||
set_legacy_8bitadam,
|
set_legacy_8bitadam,
|
||||||
|
update_optimizer,
|
||||||
)
|
)
|
||||||
from library.tensorboard_gui import (
|
from library.tensorboard_gui import (
|
||||||
gradio_tensorboard,
|
gradio_tensorboard,
|
||||||
@ -203,21 +204,22 @@ def open_config_file(
|
|||||||
original_file_path = file_path
|
original_file_path = file_path
|
||||||
file_path = get_file_path(file_path)
|
file_path = get_file_path(file_path)
|
||||||
|
|
||||||
if file_path != '' and file_path != None:
|
if not file_path == '' and not file_path == None:
|
||||||
print(f'Loading config file {file_path}')
|
|
||||||
# load variables from JSON file
|
# load variables from JSON file
|
||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
my_data_ft = json.load(f)
|
my_data_db = json.load(f)
|
||||||
|
print('Loading config...')
|
||||||
|
# Update values to fix deprecated use_8bit_adam checkbox and set appropriate optimizer if it is set to True
|
||||||
|
my_data = update_optimizer(my_data)
|
||||||
else:
|
else:
|
||||||
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
||||||
my_data_ft = {}
|
my_data_db = {}
|
||||||
|
|
||||||
values = [file_path]
|
values = [file_path]
|
||||||
for key, value in parameters:
|
for key, value in parameters:
|
||||||
# Set the value in the dictionary to the corresponding value in `my_data_ft`, or the default value if not found
|
# Set the value in the dictionary to the corresponding value in `my_data`, or the default value if not found
|
||||||
if not key in ['file_path']:
|
if not key in ['file_path']:
|
||||||
values.append(my_data_ft.get(key, value))
|
values.append(my_data_db.get(key, value))
|
||||||
# print(values)
|
|
||||||
return tuple(values)
|
return tuple(values)
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,12 @@ refresh_symbol = '\U0001f504' # 🔄
|
|||||||
save_style_symbol = '\U0001f4be' # 💾
|
save_style_symbol = '\U0001f4be' # 💾
|
||||||
document_symbol = '\U0001F4C4' # 📄
|
document_symbol = '\U0001F4C4' # 📄
|
||||||
|
|
||||||
|
def update_optimizer(my_data):
|
||||||
|
if my_data.get('use_8bit_adam', False):
|
||||||
|
my_data['optimizer'] = 'AdamW8bit'
|
||||||
|
my_data['use_8bit_adam'] = False
|
||||||
|
return my_data
|
||||||
|
|
||||||
|
|
||||||
def get_dir_and_file(file_path):
|
def get_dir_and_file(file_path):
|
||||||
dir_path, file_name = os.path.split(file_path)
|
dir_path, file_name = os.path.split(file_path)
|
||||||
@ -604,7 +610,8 @@ def gradio_advanced_training():
|
|||||||
label='Memory efficient attention', value=False
|
label='Memory efficient attention', value=False
|
||||||
)
|
)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
use_8bit_adam = gr.Checkbox(label='Use 8bit adam', value=True)
|
# This use_8bit_adam element should be removed in a future release as it is no longer used
|
||||||
|
use_8bit_adam = gr.Checkbox(label='Use 8bit adam', value=False, visible=False)
|
||||||
xformers = gr.Checkbox(label='Use xformers', value=True)
|
xformers = gr.Checkbox(label='Use xformers', value=True)
|
||||||
color_aug = gr.Checkbox(label='Color augmentation', value=False)
|
color_aug = gr.Checkbox(label='Color augmentation', value=False)
|
||||||
flip_aug = gr.Checkbox(label='Flip augmentation', value=False)
|
flip_aug = gr.Checkbox(label='Flip augmentation', value=False)
|
||||||
|
@ -25,6 +25,7 @@ from library.common_gui import (
|
|||||||
gradio_source_model,
|
gradio_source_model,
|
||||||
run_cmd_training,
|
run_cmd_training,
|
||||||
set_legacy_8bitadam,
|
set_legacy_8bitadam,
|
||||||
|
update_optimizer,
|
||||||
)
|
)
|
||||||
from library.dreambooth_folder_creation_gui import (
|
from library.dreambooth_folder_creation_gui import (
|
||||||
gradio_dreambooth_folder_creation_tab,
|
gradio_dreambooth_folder_creation_tab,
|
||||||
@ -225,6 +226,8 @@ def open_configuration(
|
|||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
my_data = json.load(f)
|
my_data = json.load(f)
|
||||||
print('Loading config...')
|
print('Loading config...')
|
||||||
|
# Update values to fix deprecated use_8bit_adam checkbox and set appropriate optimizer if it is set to True
|
||||||
|
my_data = update_optimizer(my_data)
|
||||||
else:
|
else:
|
||||||
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
||||||
my_data = {}
|
my_data = {}
|
||||||
|
@ -25,6 +25,7 @@ from library.common_gui import (
|
|||||||
gradio_config,
|
gradio_config,
|
||||||
gradio_source_model,
|
gradio_source_model,
|
||||||
set_legacy_8bitadam,
|
set_legacy_8bitadam,
|
||||||
|
update_optimizer,
|
||||||
)
|
)
|
||||||
from library.tensorboard_gui import (
|
from library.tensorboard_gui import (
|
||||||
gradio_tensorboard,
|
gradio_tensorboard,
|
||||||
@ -218,6 +219,8 @@ def open_configuration(
|
|||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
my_data_db = json.load(f)
|
my_data_db = json.load(f)
|
||||||
print('Loading config...')
|
print('Loading config...')
|
||||||
|
# Update values to fix deprecated use_8bit_adam checkbox and set appropriate optimizer if it is set to True
|
||||||
|
my_data = update_optimizer(my_data)
|
||||||
else:
|
else:
|
||||||
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
file_path = original_file_path # In case a file_path was provided and the user decide to cancel the open action
|
||||||
my_data_db = {}
|
my_data_db = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user