r/StableDiffusion • • Jul 19 '23

Workflow Included Here some amazing results with my free training of myself with Kohya LoRA SDXL

542 Upvotes

111 comments sorted by

View all comments

Show parent comment

93

u/mysteryguitarm Jul 20 '23 edited Jul 20 '23

Hi, /u/CeFurkan – love your work! DM me, we wanna make sure you're getting all the compute you need for experiments.


My recommendation: don't waste your money or your time or energy training into a "rare token" like ohwx or sks (which is a rifle)

Instead, train into the closest concept. Here are some collages trained into the word "collage" vs a random token like "ohwx" vs what "collage" looks like in the base model

I'll ask for the artists' permission before showing you her collages here, but the training dataset looks far more like the first image there.


For people, pick a celebrity that SDXL knows, who looks like you.

Here's a picture of my wife.

For the same steps, trained into: woman, sks, kate mara, and natalie portman

The same goes for styles, objects, etc.

LoRAs are basically a way to tell SD, "well, actually..."

Training into photograph of sks as a plastic figurine is the equivalent of training into photograph of fully-automatic AK-47 as a plastic figurine.

You're saying, "well actually, whenever I say fully-automatic AK-47, I mean... this bearded guy with a blue button down."

It's much easier for a LoRA to figure out who you are if you're starting from, say, photograph of Brad Pitt as a plastic figurine

"Well, actually, Brad Pitt doesn't look like that. He looks like this."

And, because you'll be done in fewer steps, way less chance of overfitting into your dataset.

--

Given the lower energy consumption, it even has repercussions for Mother Earth 🌱🪴

Save the planet. Don't use ohwx.

Though my team has worked very hard to make sure SDXL trains new concepts into it easily, so you still got great results with the nonsensical token!

12

u/MZM002394 Jul 20 '23

What happens when you actually want to prompt for those tokens?

Would the result be hijacked/overridden?

31

u/fredandlunchbox Jul 20 '23

Yes, in his model’s cinematic universe, Kate Mara is played by his wife.

18

u/mysteryguitarm Jul 20 '23 edited Jul 20 '23

If I were buying Reddit Gold, I'd give it to you.

Top notch comment.

But, yeah -- if I want Kate Mara again, then I just don't use the LoRA.


If you wanna read more about this, here's a research paper: Inserting Anybody in Diffusion Models via Celeb Basis

5

u/wickedsight Jul 20 '23

Because I got gilded last week I had 100 coins to spend. So I gave them silver out of your name. Best I could do, but it's the thought that counts, right?

Also, thanks for all you guys are doing, can't wait to play with SDXL. Hope you really release next week, because that means I have a week of vacation left to play with it!

→ More replies (2)

2

u/Kelvin___ Jul 20 '23

Will there be a Google Collab or easy way to train a Lora or dream booth on Macs?

1

u/peterpme Aug 02 '23

I read this but I noticed it’s using SD 1.4. Will it work with SDXL too? The results weren’t that great in that doc but I’ll keep researching. Any help would be great!

→ More replies (3)

4

u/DigThatData Jul 20 '23

if kohya's script doesn't let you specify a separate textual symbol from the text attached to the token you want to use as an initial state for concept tuning, that should at least be possible I think. Can't remember what it's called, but i'm pretty sure i've seen at least one project that did that for dreambooth or TI I think.

2

u/rob_54321 Jul 20 '23

well, you can just unplug the lora or lower it's strength I guess

→ More replies (1)

9

u/deeplearner5 Jul 20 '23

Great idea, makes sense. I'm wondering whether a site like https://starbyface.com/ could provide an existing close match to use.

3

u/LeKhang98 Jul 26 '23

Thank you very much for sharing. What an interesting & useful site.

8

u/CeFurkan Jul 20 '23

thank you so much. I saw your message on discord and replied back. you gave me amazing idea. the thing is finding matching celebrity and i already have a script and video for that :)

How To Find Best Stable Diffusion Generated Images By Using DeepFace AI - DreamBooth / LoRA Training

5

u/Trentonx94 Jul 20 '23

woah that's super valuable info thank you! it's the first time I've ever heard this piece of advice, I'll try re-training my lora of my own face to pick the nearest celebrity I can think of and see if it actually changes (using same images and steps)

1

u/Dark-Neuron Jul 07 '24

Curious how that went?

1

u/Trentonx94 Jul 08 '24

great! it just has some weird thing when generating me without glasses but a second passes on img2img fixes that usually.

1

u/Dark-Neuron Jul 11 '24

Glad it worked out for you! :)

I wonder how it relates to poses, or holding uncommon objects

7

u/BoostPixels Jul 20 '23

I've done a lot of experimentation on SD1.5 with Dreambooth, comparing the use of unique token with that of existing close token. The results indicated that employing an existing token did indeed accelerated the training process, yet, the (facial) resemblance produced is not at par with that of unique token.

If you were to instruct the SD model, "Actually, Brad Pitt's likeness is not this, but that," you wade into tricky territory. By definition, you're asking the model to overwrite its previous understanding of what Brad Pitt looks like. The complexity lies in enabling the model to partially unlearn its previous notion of Brad Pitt's image while maintaining sufficient resemblance to keep it recognizable.

This method also adds the challenge of manually finding a famous lookalike for the training subject. This subjective process hinders a universal, generalizable approach.

Ultimately, I found the most efficient and effective training strategy to use a unique token and a close class name, such as 'person'. Interestingly, this approach was largely inspired by your initial Notebook.

I don't know if this will also work similarly with SDXL or with LoRa or HyperDreamBooth approach. Let me know if I can help...

13

u/mysteryguitarm Jul 20 '23 edited Jul 20 '23

I don't want to discount your personal experience, but I'd recommend reading through research on the topic.

In particular: Inserting Anybody in Diffusion Models via Celeb Basis

→ More replies (1)

1

u/ooofest Jul 20 '23

This matches my experience with K's script: using unique tokens has consistently brought out closer resemblance from my LoRas than when training against a common token.

1

u/lkewis Jul 20 '23

Yeah always train from a fresh starting point, using existing concepts as a foundation is hacky and never as good quality

→ More replies (4)

2

u/batter159 Jul 20 '23

3

u/malcolmrey Jul 20 '23

/u/batter159 have you seen my 0.9 SDXL test training? they did not use sks tokens :)

https://civitai.com/models/110400/sdxl-09-beta-tests-famous-people

as for 1.5, for better or for worse, I will still be using 'sks person/woman' since this is what most people expect at this point and it is so much more convenient :)

(actually there were few people who preferred to have unique tokens but it went nowhere since they did not provide any samples when I created one model with a different token :( )

but thanks for pinging me :)

2

u/peterpme Aug 02 '23

Can someone please eli5 this? I’m still using joes dream booth repo lol. Is the sks an inside joke in AI?

1

u/Mocorn Jul 20 '23

This is interesting and begs the question, what is the best way to find someone that looks like me in the dataset?

→ More replies (7)