Skip to content

Commit

Permalink
Changed logger checkbox to dropdown, renamed use_wandb -> log_with (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharest93 authored Apr 19, 2024
1 parent 542af98 commit 25d7c68
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
9 changes: 5 additions & 4 deletions kohya_gui/class_advanced_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,11 @@ def list_state_dirs(path):
value=self.config.get("advanced.max_data_loader_n_workers", 0),
)
with gr.Row():
self.use_wandb = gr.Checkbox(
label="WANDB Logging",
value=self.config.get("advanced.use_wandb", False),
info="If unchecked, tensorboard will be used as the default for logging.",
self.log_with = gr.Dropdown(
label="Logging",
choices=["","wandb", "tensorboard","all"],
value="",
info="Loggers to use, tensorboard will be used as the default.",
)
self.wandb_api_key = gr.Textbox(
label="WANDB API Key",
Expand Down
10 changes: 5 additions & 5 deletions kohya_gui/dreambooth_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def save_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -317,7 +317,7 @@ def open_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -470,7 +470,7 @@ def train_model(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -783,7 +783,7 @@ def train_model(
),
"train_batch_size": train_batch_size,
"train_data_dir": train_data_dir,
"use_wandb": use_wandb,
"log_with": log_with,
"v2": v2,
"v_parameterization": v_parameterization,
"v_pred_like_loss": v_pred_like_loss if v_pred_like_loss != 0 else None,
Expand Down Expand Up @@ -1056,7 +1056,7 @@ def dreambooth_tab(
advanced_training.save_every_n_steps,
advanced_training.save_last_n_steps,
advanced_training.save_last_n_steps_state,
advanced_training.use_wandb,
advanced_training.log_with,
advanced_training.wandb_api_key,
advanced_training.wandb_run_name,
advanced_training.log_tracker_name,
Expand Down
10 changes: 5 additions & 5 deletions kohya_gui/finetune_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def save_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -335,7 +335,7 @@ def open_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -507,7 +507,7 @@ def train_model(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -856,7 +856,7 @@ def train_model(
"train_batch_size": train_batch_size,
"train_data_dir": image_folder,
"train_text_encoder": train_text_encoder,
"use_wandb": use_wandb,
"log_with": log_with,
"v2": v2,
"v_parameterization": v_parameterization,
"v_pred_like_loss": v_pred_like_loss if v_pred_like_loss != 0 else None,
Expand Down Expand Up @@ -1209,7 +1209,7 @@ def list_presets(path):
advanced_training.save_every_n_steps,
advanced_training.save_last_n_steps,
advanced_training.save_last_n_steps_state,
advanced_training.use_wandb,
advanced_training.log_with,
advanced_training.wandb_api_key,
advanced_training.wandb_run_name,
advanced_training.log_tracker_name,
Expand Down
10 changes: 5 additions & 5 deletions kohya_gui/lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def save_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -400,7 +400,7 @@ def open_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -635,7 +635,7 @@ def train_model(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -1152,7 +1152,7 @@ def train_model(
"train_data_dir": train_data_dir,
"training_comment": training_comment,
"unet_lr": unet_lr if not 0 else None,
"use_wandb": use_wandb,
"log_with": log_with,
"v2": v2,
"v_parameterization": v_parameterization,
"v_pred_like_loss": v_pred_like_loss if v_pred_like_loss != 0 else None,
Expand Down Expand Up @@ -2223,7 +2223,7 @@ def update_LoRA_settings(
advanced_training.save_every_n_steps,
advanced_training.save_last_n_steps,
advanced_training.save_last_n_steps_state,
advanced_training.use_wandb,
advanced_training.log_with,
advanced_training.wandb_api_key,
advanced_training.wandb_run_name,
advanced_training.log_tracker_name,
Expand Down
10 changes: 5 additions & 5 deletions kohya_gui/textual_inversion_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def save_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -319,7 +319,7 @@ def open_configuration(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -471,7 +471,7 @@ def train_model(
save_every_n_steps,
save_last_n_steps,
save_last_n_steps_state,
use_wandb,
log_with,
wandb_api_key,
wandb_run_name,
log_tracker_name,
Expand Down Expand Up @@ -800,7 +800,7 @@ def train_model(
"token_string": token_string,
"train_batch_size": train_batch_size,
"train_data_dir": train_data_dir,
"use_wandb": use_wandb,
"log_with": log_with,
"v2": v2,
"v_parameterization": v_parameterization,
"v_pred_like_loss": v_pred_like_loss if v_pred_like_loss != 0 else None,
Expand Down Expand Up @@ -1167,7 +1167,7 @@ def list_embedding_files(path):
advanced_training.save_every_n_steps,
advanced_training.save_last_n_steps,
advanced_training.save_last_n_steps_state,
advanced_training.use_wandb,
advanced_training.log_with,
advanced_training.wandb_api_key,
advanced_training.wandb_run_name,
advanced_training.log_tracker_name,
Expand Down

0 comments on commit 25d7c68

Please sign in to comment.