-
Notifications
You must be signed in to change notification settings - Fork 6k
Kohya LORA and variant Loading for SDXL #4133
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
Comments
cc @sayakpaul |
Thanks for bringing this to our attention. If you want to use it diffusers right away, you could repurpose a script like the one shown here. We're working on bringing better support for this in |
Hmm, I was investigating the LoRA you mentioned and it's obvious that the LoRA has three model components affected: two text encoders and the UNet. On top of that, it seems to be adding LoRA on a multitude of places:
I am also seeing a new type of identifier "hada" -- what does it stand for? From Diffusers, we only have LoRA support for the attention blocks. This is why we started #3756. As you can imagine to have a "somewhat" robust design, we need to work a bit. |
Thanks for your efforts really appreciate you and your teams work on this! I investigated where the I am unsure what is special about this, but here's essentially the only code of interest in regards to it: I'm afraid I have nothing more of any technical value I can contribute in regard to the specifics, I couldn't find really any documentation or references to what hada is anywhere. Cheers, |
LyCORIS modules is from HERE |
I've started investigating how to support this natively on diffusers and it seems like there are two pre-requisite PRs before we can attempt to load kohya-ss style LoRAs at all:
I think both of these PRs are very close to the finishing line (considering they are both approved) and I'd be happy to start the actual work once both of them are landed. In the meanwhile, I'll be using a custom branch which rebases on top of those two to see what other changes are required and update the progress here. |
Let me get back to this. |
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 is the issue? |
https://huggingface.co/spaces/John6666/votepurchase-multiple-model/discussions/12#674b42879820aac918a8ad46 I'm not sure about the progress, but I think it's mainly because of the difficulty in distinguishing between LoRA and its variants... |
We should always be careful with statements like this one: "LyCORIS is in high demand as it is the most common LoRA variant" If we assume that civitai is the most used image generation models sharing website today, and you filter by Unless you are telling us that the lora variants are the minority and of those Lycoris is the most common one, the previous statement is not correct, also I never use Lycoris variants but all the other loras works right out of the box with diffusers. To test this, I just picked up a random lycoris lora (by the website) and loaded it with diffusers, it worked without a problem too:
I suggest that, better than just posting in a more than a year old closed issue, you open a new issue with the reproducible code snippet we can test and this should include a specific lora that triggers it. |
Sorry for my poor English.😭 I meant to refer to the majority among the subspecies. Anyway, we will check the operation again after tomorrow and try to raise a new issue if necessary. |
Currently, LoraLoaderMixin supports Koha format for older SD models. However, with the change in architecture and the two text encoders, the process is now different for SDXL.
I don't feel overly confident implementing this myself, but I have made an SDXL lora (Lycoris) that loads up fine in comfyui to test with:
https://civitai.com/models/111031?modelVersionId=119726
Cheers,
Z.
The text was updated successfully, but these errors were encountered: