Skip to content

Commit

Permalink
Validate if lora type is Flux1 when flux1_checkbox is true
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Sep 8, 2024
1 parent 8f6229f commit 4bae4fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kohya_gui/lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,12 @@ def train_model(
if not validate_args_setting(optimizer_args):
return TRAIN_BUTTON_VISIBLE

if flux1_checkbox:
log.info(f"Validating lora type is Flux1 if flux1 checkbox is checked...")
if LoRA_type != "Flux1":
log.error("LoRA type must be set to Flux1 if Flux1 checkbox is checked.")
return TRAIN_BUTTON_VISIBLE

#
# Validate paths
#
Expand Down

0 comments on commit 4bae4fc

Please sign in to comment.