Skip to content

Commit

Permalink
Fix for max_train_steps
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Sep 13, 2024
1 parent 0d53ac6 commit 46b57ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kohya_gui/lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ def train_model(
log.info(f"Total steps: {total_steps}")

# Calculate stop_text_encoder_training
if max_train_steps > 0 and stop_text_encoder_training > 0:
if max_train_steps is not None and max_train_steps > 0 and stop_text_encoder_training > 0:
stop_text_encoder_training = math.ceil(
max_train_steps * stop_text_encoder_training / 100
)
Expand Down

0 comments on commit 46b57ed

Please sign in to comment.