Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

LORAs #16

jdluzen started this conversation in Ideas
Nov 10, 2023 · 5 comments · 8 replies
Discussion options

Thoughts on LORA/etc. implementation? I know what and how they work conceptually. But what I don't know, is what math goes on with which tensors at what stage? I'm guessing UNET?

You must be logged in to vote

Replies: 5 comments 8 replies

Comment options

LORA is on my todo list, but still have upscaler to get done first, so if you wanna give it a shot that would be awesome

I think LORA application is fairly inexpensive, a assume we need the tokenizer and unet

Might be worth a looky in here
https://github.com/huggingface/diffusers/blob/1328aeb274610f492c10a246ffba0bc4de8f689b/src/diffusers/loaders.py#L1173

You must be logged in to vote
0 replies
Comment options

having lora will be amazing, a simple trainer/lora maker will be great to

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

very very good, lora lcm will be great, also i was thinking if u guys connect animatediff with lcm will be a game changer too, much much faster animations will we have!

You must be logged in to vote
0 replies
Comment options

I have opened a PR for this
#20

If someone knows of a good, but small SD 1.5 LoRA for Onnx let me know, need one for testing (not LCM, will be easier to support SD first)

You must be logged in to vote
8 replies
Comment options

oh my bad then :D let's wait someone convert one to onnx

Comment options

Good to hear the implementation looks trivial. I've been looking around that diffusers loaders code you linked, load_lora_into_unet looked promising but it's rough going. I'm expecting to see tensor math or something, but all I see are various dictionary entries being replaced.

Comment options

as far as I can tell its as simple as that, the LoRA is just a dictionary of keys and weights to be applied to existing tokens in the model

Unless I am missing a big piece, if I am I will soon find out, lol

Comment options

I think its similar to prompt weighting, which is another thing we need to add

Using () [] to boost/lower keyword in a prompt, like other apps

Find all () [] groups, extract keyword -> Tokenize Text -> match tokens to text -> multiply tokens weights by 'n'

Comment options

@saddam213 if you still need a LoRA for this, I can make one for you or send you one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /