Closed sinanhlvc closed 1 year ago
Cc: @isidentical what do you think?
Run the interference script with this LoRa
What is the base model you are testing with @sinanhlvc? Is it regular SD 1.5 or something else?
Run the interference script with this LoRa
What is the base model you are testing with @sinanhlvc? Is it regular SD 1.5 or something else?
Hi! Sorry I should've mentioned it. I have tested on base SD 1.5 and fine-tuned versions like Dreamshaper, deliberate, etc. and got the same error with this LoRa
Possible to post a fully reproducible snippet? Preferably a Colab Notebook would be really helpful.
@isidentical WDYT?
Possible to post a fully reproducible snippet? Preferably a Colab Notebook would be really helpful.
@isidentical WDYT?
Here's the notebook.
Looking at both A1111 and Kohya-SS's implementation, I think this is an allowed operation (where the LoRA rank outmatches the existing dimensions) (for both conv and linear): https://github.com/huggingface/diffusers/blob/aaef41b5fe06535fe6dd0caa723386c0e7494cec/src/diffusers/models/lora.py#L57-L58
E.g. this is A1111s:
As long as the different shapes don't create a problem (not super sure whether torch or diffusers automatically reshapes somewhere else), we might be able to drop this check @sayakpaul.
Yes this check shouldn't be necessary as the only requirement is the shapes hook together like
in_dim -> rank -> rank -> out_dim |------down----| |--------up-----|
Though if rank is larger than both in dim and out dim technically the inner projection isn't a down projection anymore :P and you lose the nice properties of the auxiliary lora blocks being smaller than the original network.
Describe the bug
Hi! I'm unable to load a LoRa as I get the following error.
ValueError: LoRA rank 384 must be less or equal than 320
The LoRa works perfectly if the ValueError check is removed from the code. Is it possible to override this error? I don't understand why it must be less or equal. Thanks!
Reproduction
Run the interference script with this LoRa Get error about the LoRa rank
Logs
System Info
diffusers
version: 0.19.3Who can help?
@williamberman @patrickvonplaten @saya