mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
Merge pull request #521 from akshaal/fix/save_state
fix: don't save state if no --save-state arg given
This commit is contained in:
@@ -3167,6 +3167,7 @@ def save_sd_model_on_epoch_end_or_stepwise(
|
||||
print(f"removing old model: {remove_out_dir}")
|
||||
shutil.rmtree(remove_out_dir)
|
||||
|
||||
if args.save_state:
|
||||
if on_epoch_end:
|
||||
save_and_remove_state_on_epoch_end(args, accelerator, epoch_no)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user