From 3eb8fb187501352b54c4735b41c67128d3517ae3 Mon Sep 17 00:00:00 2001 From: Yuta Hayashibe Date: Wed, 18 Jan 2023 01:31:38 +0900 Subject: [PATCH] Make not to save state when args.save_state is False --- library/train_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/train_util.py b/library/train_util.py index aee762d5..3a7c2c8a 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -1348,7 +1348,7 @@ def save_sd_model_on_epoch_end(args: argparse.Namespace, accelerator, src_path: remove_old_func = remove_du saving = save_on_epoch_end(args, save_func, remove_old_func, epoch_no, num_train_epochs) - if saving and args.save_state or args.save_last_n_epochs_state is not None: + if saving and args.save_state: save_state_on_epoch_end(args, accelerator, model_name, epoch_no)