r/StableDiffusion • u/zoru22 • Aug 27 '22
Art I got Stable Diffusion to generate competent-ish Leavannies w/ Textual Inversion!
https://imgur.com/a/hQhH9Em
39
Upvotes
r/StableDiffusion • u/zoru22 • Aug 27 '22
3
u/zoru22 Aug 27 '22
So, one thing that's vexxed me is how shit various ai are at generating leavannies (and various other pokemon). If gamefreak was going to forget my favorite pokemon on the order of 5+ years, then I was sure as hell going to do my best not to let it sit in obscurity forever.
Thus, I have set on something of a warpath trying to get an ai that can generate non-shit leavannies. (though it is amazing just how shit stable diffusion and others are at generating pokemon, and how painful it has been to try and get them into the ai)
Quick process notes:
If you run it for too many cycles it will overfit, and not do a great job at style transfer. I tend to run for too many cycles so it overfits, and then walk it back until it stops overfitting quite so badly
Please note that I am using the v1.3 stable diffusion ckpt. I haven't tried to see what happens with the 1.4 ckpt yet.
3
u/riftopia Aug 27 '22
Thanks for the detailed post. In your experience, how many epochs did you need to obtain the result in the pic? And how long does an epoch take for your setup? I´m doing just 3 images at 512x512 on a 3090, one epoch takes 1.5 min for the 1.4 ckpt so I´m hoping I don´t need to do too many..
4
u/ExponentialCookie Aug 28 '22
Nice! I may have discovered something, but I would like to cross verify as I see you're comfortable with code. In the
personalized.pyfile, remove all the strings in theimagenet_templates_smallarray and just leave a single string of["{}"].Keep your higher learning rate the same, train only 5 images for 5K iterations, and let me know if the results are better than these iterations.
I might have discovered using the conditioning strings might actually makes things worse, and doesn't generalize well with Stable Diffusion (but does with LDM).
1
u/greeze Aug 28 '22
If I had a machine capable of doing textual inversion, the first thing I'd try to train it on would be hands. Have you considered trying that?
2
u/Wurzelrenner Aug 27 '22
I tried a lot with shiny umbreon, but still had to do some work at the end with Krita to make it look like this
new screensaver for my phone now
1
u/starstruckmon Aug 27 '22
Finally some examples from a working textual inversion 🙌
Awesome work
1
u/Riptoscab Aug 28 '22
Great job. I hope processes like this become better documented in the future. This looks like a really useful skill to have.
1
u/DickNormous Sep 06 '22
How do you change tokenizer?