1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

do not scale the initial global step by gradient accumulation steps when loading from checkpoint (#3506)

This commit is contained in:
Will Berman
2023-05-22 15:19:56 -07:00
committed by GitHub
parent 64bf5d33b7
commit 67cd460154

View File

@@ -979,7 +979,7 @@ def main(args):
accelerator.load_state(os.path.join(args.output_dir, path))
global_step = int(path.split("-")[1])
initial_global_step = global_step * args.gradient_accumulation_steps
initial_global_step = global_step
first_epoch = global_step // num_update_steps_per_epoch
else:
initial_global_step = 0