Unverified Commit 1037287e authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

examples fix t2i training (#5001)

* examples fix t2i training

* make style
parent 6ea95b7a
......@@ -1060,7 +1060,9 @@ def main(args):
)
# Prepare everything with our `accelerator`.
t2iadapter, optimizer, lr_scheduler = accelerator.prepare(t2iadapter, optimizer, lr_scheduler)
t2iadapter, optimizer, train_dataloader, lr_scheduler = accelerator.prepare(
t2iadapter, optimizer, train_dataloader, lr_scheduler
)
# We need to recalculate our total training steps as the size of the training dataloader may have changed.
num_update_steps_per_epoch = math.ceil(len(train_dataloader) / args.gradient_accumulation_steps)
......
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