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)