Fix LoKr format LoRA weight loading for Flux2 pipelines#13997
Fix LoKr format LoRA weight loading for Flux2 pipelines#13997Whning0513 wants to merge 1 commit into
Conversation
|
Hi @Whning0513, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
|
Hi @Whning0513 this is not the correct way to handle lokr, with this fix the lora will load but practically won't have any effect. Please look at this issue and this PR if you want to contribute |
|
You're right, I looked at the code again and this approach doesn't properly handle the LoKr factorization — it just suppresses the error without actually applying the weights correctly. I see PR #13326 already has a proper implementation for this. I'll close this one. Thanks for taking the time to review and point me to the right direction. |
|
Thanks for the guidance. I closed #13997 and will focus on the other fixes. Let me know if any of the remaining PRs need changes. |
LoKr weights were failing to load with a
ValueErrorabout non-emptyoriginal_state_dict. Adjusted the weight processing to handle the LoKr format correctly.