Skip to content

Commit

Permalink
Convert config with use_wandb to log_with = wandb
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Apr 19, 2024
1 parent 25d7c68 commit 5a80164
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,20 @@ def update_my_data(my_data):
my_data["xformers"] = "xformers"
else:
my_data["xformers"] = "none"


# Convert use_wandb to log_with="wandb" if it is set to True
for key in ["use_wandb"]:
value = my_data.get(key)
if value is not None:
try:
if value == "True":
my_data["log_with"] = "wandb"
except ValueError:
# Handle the case where the string is not a valid float
pass

my_data.pop(key, None)

return my_data


Expand Down

0 comments on commit 5a80164

Please sign in to comment.