Spaces:
Sleeping
Sleeping
Update train_dreambooth_lora_sdxl.py
Browse files
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 =
|
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.
|