-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue merging a Lora model to a SANA transformer #2318
Comments
Please make the code fully reproducible. |
Updated the code with missing imports. |
Could you please show how you initialized the model (training code not necessary) and how you saved it? Also, do you know if the |
I've investigated this a bit more and found out only the target module 'conv_depth' makes it crash, PEFT with the other modules work fine.
|
I also want to add that calling the forward function with lokr and loha also crash on the conv_depth module, but not with the regular lora algorithm. |
Thanks for the snippet. The LoRA adapter does not have the right shape because we're not honoring the
Most likely, the same issue is the cause here. I'm not sure why forward works for LoRA but I would not rely on the result being correct. |
System Info
peft=0.14.0
Who can help?
@BenjaminBossan @sayakpaul
Information
Tasks
examples
folderReproduction
Expected behavior
I've trained a Lora model with PEFT on a SANA checkpoint. I can train and inference using the PEFT model. However, when I try to merge the Lora to the base checkpoint, I encounter a shape mismatch. I've attached the Lora model with a rank 4.
0.zip
The text was updated successfully, but these errors were encountered: