-
Notifications
You must be signed in to change notification settings - Fork 6k
[WIP][LoRA] support sd3.5 non-diffusers loras. #10167
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
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
i'll give it a test. fyi, we just did a complete lora processing refactoring in sdnext and changed load/apply methods from forward to pre-processing. |
Thanks, Vlad! |
is_correct_format = all("lora" in key for key in state_dict.keys()) | ||
if not is_correct_format: | ||
raise ValueError("Invalid LoRA checkpoint.") | ||
|
||
transformer_state_dict = {k: v for k, v in state_dict.items() if "transformer." in k} | ||
transformer_state_dict = {k: v for k, v in state_dict.items() if k.startswith(f"{self.transformer_name}.")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To inform the user about it when load_lora_weights()
effectively becomes a no-op.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
What does this PR do?
Fixes #9950.
Currently, it only supports LoRAs having the MMDiT blocks.
@vladmandic possible to test this? We can improve support for the LoRAs involving non-MMDiT blocks as we go.