Skip to content

Commit 1fff527

Browse files
authored
Fix keys for lora format on advanced training scripts (#6361)
fix keys for lora format on advanced training scripts
1 parent 645a62b commit 1fff527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
19551955
if accelerator.is_main_process:
19561956
unet = accelerator.unwrap_model(unet)
19571957
unet = unet.to(torch.float32)
1958-
unet_lora_layers = get_peft_model_state_dict(unet)
1958+
unet_lora_layers = convert_state_dict_to_diffusers(get_peft_model_state_dict(unet))
19591959

19601960
if args.train_text_encoder:
19611961
text_encoder_one = accelerator.unwrap_model(text_encoder_one)

0 commit comments

Comments
 (0)