Skip to content

Commit 3eb27ce

Browse files
Skip the final 1 step
1 parent b2363f1 commit 3eb27ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

train_network.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,10 @@ def remove_model(old_ckpt_name):
897897

898898
for step, batch in enumerate(skipped_dataloader or train_dataloader):
899899
current_step.value = global_step
900+
if initial_step > 0:
901+
initial_step -= 1
902+
continue
903+
900904
with accelerator.accumulate(training_model):
901905
on_step_start(text_encoder, unet)
902906

0 commit comments

Comments
 (0)