Skip to content

Commit

Permalink
Fix keys for lora format on advanced training scripts (huggingface#6361)
Browse files Browse the repository at this point in the history
fix keys for lora format on advanced training scripts
  • Loading branch information
apolinario authored and Jimmy committed Apr 26, 2024
1 parent ac7f88c commit bc0a908
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
if accelerator.is_main_process:
unet = accelerator.unwrap_model(unet)
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:
text_encoder_one = accelerator.unwrap_model(text_encoder_one)
Expand Down

0 comments on commit bc0a908

Please sign in to comment.