We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 675ef1f commit f7154f8Copy full SHA for f7154f8
examples/text_to_image/train_text_to_image.py
@@ -685,9 +685,8 @@ def collate_fn(examples):
685
accelerator.load_state(os.path.join(args.output_dir, path))
686
global_step = int(path.split("-")[1])
687
688
- resume_global_step = global_step * args.gradient_accumulation_steps
689
- first_epoch = resume_global_step // num_update_steps_per_epoch
690
- resume_step = resume_global_step % num_update_steps_per_epoch
+ first_epoch = global_step // num_update_steps_per_epoch
+ resume_step = global_step % num_update_steps_per_epoch
691
692
# Only show the progress bar once on each machine.
693
progress_bar = tqdm(range(global_step, args.max_train_steps), disable=not accelerator.is_local_main_process)
0 commit comments