mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
invert condition for checking log_with
This commit is contained in:
@@ -2748,7 +2748,9 @@ def prepare_accelerator(args: argparse.Namespace):
|
|||||||
log_prefix = "" if args.log_prefix is None else args.log_prefix
|
log_prefix = "" if args.log_prefix is None else args.log_prefix
|
||||||
logging_dir = args.logging_dir + "/" + log_prefix + time.strftime("%Y%m%d%H%M%S", time.localtime())
|
logging_dir = args.logging_dir + "/" + log_prefix + time.strftime("%Y%m%d%H%M%S", time.localtime())
|
||||||
|
|
||||||
if args.log_with is not None:
|
if args.log_with is None:
|
||||||
|
log_with = None
|
||||||
|
else:
|
||||||
log_with = args.log_with
|
log_with = args.log_with
|
||||||
if log_with in ["tensorboard", "all"]:
|
if log_with in ["tensorboard", "all"]:
|
||||||
if logging_dir is None:
|
if logging_dir is None:
|
||||||
@@ -2761,8 +2763,6 @@ def prepare_accelerator(args: argparse.Namespace):
|
|||||||
if logging_dir is not None:
|
if logging_dir is not None:
|
||||||
os.makedirs(logging_dir, exist_ok=True)
|
os.makedirs(logging_dir, exist_ok=True)
|
||||||
os.environ["WANDB_DIR"] = logging_dir
|
os.environ["WANDB_DIR"] = logging_dir
|
||||||
else:
|
|
||||||
log_with = None
|
|
||||||
|
|
||||||
accelerator = Accelerator(
|
accelerator = Accelerator(
|
||||||
gradient_accumulation_steps=args.gradient_accumulation_steps,
|
gradient_accumulation_steps=args.gradient_accumulation_steps,
|
||||||
|
|||||||
Reference in New Issue
Block a user