Skip to content

Error in loading the pretrained lora weights #11675

Closed
@garychan22

Description

@garychan22

Hi, I am using the script https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora_sdxl.py to train a lora.

An error is raised on https://github.com/huggingface/diffusers/blob/73a9d5856f2d7ae3637c484d83cd697284ad3962/examples/text_to_image/train_text_to_image_lora_sdxl.py#L1314C9-L1314C52

Loading adapter weights from state_dict led to missing keys in the model: down_blocks.1.attentions.0.transformer_blocks.0.attn1.to_q.lora_A
.default_0.weight, down_blocks.1.attentions.0.transformer_blocks.0.attn1.to_q.lora_B.default_0.weight, ...

The difference between the keys in the saved lora weights and the ''missing keys'' mentioned above is ''default_0''. How can I resolve this problem?

diffusers 0.32.2
peft 0.15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions