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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user