Skip to content
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

blend ONNX with LoRA and Textual Inversions in memory #243

Merged
merged 30 commits into from
Mar 17, 2023
Merged

Conversation

ssube
Copy link
Owner

@ssube ssube commented Mar 14, 2023

  • implement LoRA + ONNX blending
    • for sd-scripts
      • nn.Linear
      • nn.Conv2d 1x1
      • nn.Conv2d 3x3
  • implement Textual Inversion + ONNX blending
  • add a way to include LoRA models in the extras.json file
  • save external weights in memory, no files
  • add a way to specify LoRA models and their weights in the prompt
  • document it in the user guide

For later:

  • cloneofsimo lora support

@ssube ssube mentioned this pull request Mar 15, 2023
@ssube ssube changed the title LoRA blend LoRA on the fly Mar 15, 2023
@ssube ssube changed the title blend LoRA on the fly blend ONNX with LoRA on the fly Mar 15, 2023
@ssube ssube changed the title blend ONNX with LoRA on the fly blend ONNX with LoRA in memory Mar 15, 2023
@ssube ssube changed the title blend ONNX with LoRA in memory blend ONNX with LoRA and Textual Inversions in memory Mar 16, 2023
@ssube
Copy link
Owner Author

ssube commented Mar 17, 2023

This passed release tests on CUDA and DirectML and seems to be working.

I'll add support for cloneofsimo LoRAs later. They use the node index rather than path name, so finding those should be possible, but will be much more sensitive to optimizations.

@sonarcloud
Copy link

sonarcloud bot commented Mar 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ssube ssube merged commit d9bae80 into main Mar 17, 2023
This was referenced Mar 17, 2023
@ssube ssube added this to the v0.9 milestone Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant