"docs/vscode:/vscode.git/clone" did not exist on "9920c333c69d372911a4549cde7cb7cc12cd4dc8"
Unverified Commit 1fff5277 authored by apolinário's avatar apolinário Committed by GitHub
Browse files

Fix keys for lora format on advanced training scripts (#6361)

fix keys for lora format on advanced training scripts
parent 645a62bf
...@@ -1955,7 +1955,7 @@ def main(args): ...@@ -1955,7 +1955,7 @@ def main(args):
if accelerator.is_main_process: if accelerator.is_main_process:
unet = accelerator.unwrap_model(unet) unet = accelerator.unwrap_model(unet)
unet = unet.to(torch.float32) unet = unet.to(torch.float32)
unet_lora_layers = get_peft_model_state_dict(unet) unet_lora_layers = convert_state_dict_to_diffusers(get_peft_model_state_dict(unet))
if args.train_text_encoder: if args.train_text_encoder:
text_encoder_one = accelerator.unwrap_model(text_encoder_one) text_encoder_one = accelerator.unwrap_model(text_encoder_one)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment