"src/vscode:/vscode.git/clone" did not exist on "6a0137eb3bb4a6689d3da10161d3f550e29aef6c"
Unverified Commit f7154f85 authored by Manfred Lindmark's avatar Manfred Lindmark Committed by GitHub
Browse files

Fix --resume_from_checkpoint step in train_text_to_image.py (#1914)

fix resume step in train_text_to_image example
parent 675ef1ff
......@@ -685,9 +685,8 @@ def main():
accelerator.load_state(os.path.join(args.output_dir, path))
global_step = int(path.split("-")[1])
resume_global_step = global_step * args.gradient_accumulation_steps
first_epoch = resume_global_step // num_update_steps_per_epoch
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
# Only show the progress bar once on each machine.
progress_bar = tqdm(range(global_step, args.max_train_steps), disable=not accelerator.is_local_main_process)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment