Skip to content

Commit

Permalink
Add wandb_run_name parameter to init_kwargs #1032
Browse files Browse the repository at this point in the history
  • Loading branch information
kohya-ss committed Jan 14, 2024
1 parent 09ef3ff commit 32b759a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fine_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def fn_recursive_set_mem_eff(module: torch.nn.Module):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers("finetuning" if args.log_tracker_name is None else args.log_tracker_name, init_kwargs=init_kwargs)
Expand Down
2 changes: 2 additions & 0 deletions sdxl_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ def fn_recursive_set_mem_eff(module: torch.nn.Module):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers("finetuning" if args.log_tracker_name is None else args.log_tracker_name, init_kwargs=init_kwargs)
Expand Down
2 changes: 2 additions & 0 deletions sdxl_train_control_net_lllite.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ def train(args):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers(
Expand Down
2 changes: 2 additions & 0 deletions train_controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ def train(args):
)
if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers(
Expand Down
2 changes: 2 additions & 0 deletions train_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ def train(args):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers("dreambooth" if args.log_tracker_name is None else args.log_tracker_name, init_kwargs=init_kwargs)
Expand Down
2 changes: 2 additions & 0 deletions train_textual_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ def train(self, args):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers(
Expand Down
2 changes: 2 additions & 0 deletions train_textual_inversion_XTI.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ def train(args):

if accelerator.is_main_process:
init_kwargs = {}
if args.wandb_run_name:
init_kwargs['wandb'] = {'name': args.wandb_run_name}
if args.log_tracker_config is not None:
init_kwargs = toml.load(args.log_tracker_config)
accelerator.init_trackers("textual_inversion" if args.log_tracker_name is None else args.log_tracker_name, init_kwargs=init_kwargs)
Expand Down

0 comments on commit 32b759a

Please sign in to comment.