Merge pull request #437 from kohya-ss/dev

fix tensorboard logging without log_with
This commit is contained in:
Kohya S
2023-04-23 19:19:48 +09:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -127,6 +127,11 @@ The majority of scripts is licensed under ASL 2.0 (including codes from Diffuser
## Change History
### 23 Apr. 2023, 2023/4/23:
- Fixed to log to TensorBoard when `--logging_dir` is specified and `--log_with` is not specified.
- `--logging_dir`を指定し`--log_with`を指定しない場合に、以前と同様にTensorBoardへログ出力するよう修正しました。
### 22 Apr. 2023, 2023/4/22:
- Added support for logging to wandb. Please refer to [PR #428](https://github.com/kohya-ss/sd-scripts/pull/428). Thank you p1atdev!

View File

@@ -2758,7 +2758,10 @@ def prepare_accelerator(args: argparse.Namespace):
logging_dir = args.logging_dir + "/" + log_prefix + time.strftime("%Y%m%d%H%M%S", time.localtime())
if args.log_with is None:
log_with = None
if logging_dir is not None:
log_with = "tensorboard"
else:
log_with = None
else:
log_with = args.log_with
if log_with in ["tensorboard", "all"]: