Skip to content

Commit

Permalink
Merge pull request #1656 from rockerBOO/master
Browse files Browse the repository at this point in the history
Fix VAE being applied (for LoRA training)
  • Loading branch information
bmaltais authored Nov 11, 2023
2 parents 609e184 + 02bf68a commit 2b7942f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,12 @@ def run_cmd_advanced_training(**kwargs):
wandb_api_key = kwargs.get('wandb_api_key', '')
if wandb_api_key:
run_cmd += f' --wandb_api_key="{wandb_api_key}"'

vae = kwargs.get(
'vae'
)
if vae:
run_cmd += ' --vae="{vae}"'

return run_cmd

Expand Down
5 changes: 5 additions & 0 deletions lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def save_configuration(
full_bf16,
min_timestep,
max_timestep,
vae
):
# Get list of function parameters and values
parameters = list(locals().items())
Expand Down Expand Up @@ -323,6 +324,7 @@ def open_configuration(
min_timestep,
max_timestep,
training_preset,
vae
):
# Get list of function parameters and values
parameters = list(locals().items())
Expand Down Expand Up @@ -496,6 +498,7 @@ def train_model(
full_bf16,
min_timestep,
max_timestep,
vae
):
# Get list of function parameters and values
parameters = list(locals().items())
Expand Down Expand Up @@ -1001,6 +1004,7 @@ def train_model(
scale_v_pred_loss_like_noise_pred=scale_v_pred_loss_like_noise_pred,
min_timestep=min_timestep,
max_timestep=max_timestep,
vae=vae,
)

run_cmd += run_cmd_sample(
Expand Down Expand Up @@ -1658,6 +1662,7 @@ def update_LoRA_settings(LoRA_type):
advanced_training.full_bf16,
advanced_training.min_timestep,
advanced_training.max_timestep,
advanced_training.vae,
]

config.button_open_config.click(
Expand Down

0 comments on commit 2b7942f

Please sign in to comment.