amazonaws-sp commited on
Commit
7aa9222
·
verified ·
1 Parent(s): ed120a6

Update train_dreambooth_lora_sdxl.py

Browse files
Files changed (1) hide show
  1. train_dreambooth_lora_sdxl.py +1 -1
train_dreambooth_lora_sdxl.py CHANGED
@@ -1126,7 +1126,7 @@ def main(args):
1126
  if overrode_max_train_steps:
1127
  args.max_train_steps = args.num_train_epochs * num_update_steps_per_epoch
1128
  # Afterwards we recalculate our number of training epochs
1129
- args.num_train_epochs = 4
1130
 
1131
  # We need to initialize the trackers we use, and also store our configuration.
1132
  # The trackers initializes automatically on the main process.
 
1126
  if overrode_max_train_steps:
1127
  args.max_train_steps = args.num_train_epochs * num_update_steps_per_epoch
1128
  # Afterwards we recalculate our number of training epochs
1129
+ args.num_train_epochs = math.ceil(args.max_train_steps / num_update_steps_per_epoch)
1130
 
1131
  # We need to initialize the trackers we use, and also store our configuration.
1132
  # The trackers initializes automatically on the main process.