[Stable Diffusion] Prompt Sharing and Learning Thread

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
Wow, is high time. at 3000 step my train run in 30 mins.
Then in 1200 step i run it in 14 mins.
Can you prepare your image for train?

Yes, i decide to trin my own because many on downloaded are really messed up, seem bad initialization word or too many step.
I'm testing now actually i reach good result from 3 to 14 cfg.
Also is not powered like LORA, is possible to training lora on 6Gb?
I think that you can make your own Lora with 6GB vram yes. You just need to use low resolution 512,512 or maybe you need to go lower.
Rentry's I recommend to read if you decide to try it.



I used kohya_ss to make mine.
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
I read in different TI on CIVITAI people using 0.004 or 0.005 and AI Entrepreneur uses the following '0.05:10,0.02:20,0.01:60,0.005:200,0.002:500,0.001:3000,0.005' - I have not yet successfully completed on. Just starting it and seeing over 4-5 hours of training was a bit deflating...
4-5 hours isn't bad at all. Try 10 hours plus for a good Lora... At least with my setup. Just set it and go do some laundry or something.. ;) :p
 

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
have some of you nice suggestion on Textuail inversion?
i experimented a lot on these day, and i see many tutorial, but every tutorial use same "learning rate", and so i experimented with it.

On my test seem work great on high value, i mean i train on 1200 step and get good result with value like "1.05, 3.2,2.1"
Have someone experienced it?
I have made a few TIs (downloadable from ) - some people run them high learning rate to start with, then turn it down massively as it starts to produce good results. Frankly they always look a bit off or rushed to me.
I have a fairly standard 'recipe' for a photorealistic-type TI:

- At least 60 images. Good ones. Varied poses, clothes and, especially, expressions. Try to get a face in profile or two. Some full body, some close-up faces. Curate them well and ensure you manually crop and resize them to 512x512. Don't use automated tools, they're all shit! MS Paint is fine. Ideally, have over 100 images. Don't upscale shit photos, go looking for a better quality original instead. All this takes time. It matters though. Don't bake a cake with mouldy flour and rotten eggs.

- Some guides recommend the mirroring option to double the number of images. This is fine if you're training on an object, but how many people have a truly symmetrical face? You'll just make them look a bit weird. Don't use this option.

- Use a completely unambiguous name and token for your embedding e.g. for Kylie Minogue I used "KYL13M". That way SD won't try to use its default Kylie training which looks nothing like her. No chance of any influence.

- A learning rate of 0.0015. I don't vary it, seems OK for me. It's pretty low so you shouldn't overtrain. Overtraining is mostly an issue for the impatient who try to rush it.

- 12-20 Vectors per token. No less than 12 for a person, ensure you have at least 5 images per vector. Don't bother with more than 20. I once tried 40, the law of diminishing returns kicked in.

- Use SD1.5 as the base model for training to give optimum applicability across other models.

- Set 'subject' instead of 'style'.

- Set a good prompt in the txt2img tab - one you would probably use when generating the finished product. Avoid weightings though, keep it all unweighted. Avoid LoRAs or other embeddings too if you can. Set it to preview (and save an embedding) every 500 or 1000 steps. Give it a fixed seed so you're always generating previews on the same prompt and seed.

- Set the steps limit to 30,000.

- Hit 'Train embedding', open the preview images folder and find something else to do for several hours(!)

- Your previews will be terrible, SD1.5 is actually an awful model for photorealistic people. You should still be able to find the point where it really starts to settle down though, usually around 17k steps or more.

- Copy the relevant embeddings (the .pt files, suffixed "-n" where n is the no of steps) for those previews that seem best into the main \embeddings folder.

- Set up scripting X/Y/Z plot with prompt S/R to switch from KYL13M-18000 to KYL13M-19000 to KYL13M-20000 etc. Run a quick test in your model of choice NOT SD1.5 itself. A couple of images for each draft embedding on test, with a fixed seed so it reuses the same couple of seeds each time.

- Compare the results to see which is best. Remember, if you've spent long enough curating the images, the not-Artificial Intelligence in your brain will also be trained on the subject! You should inherebtly know which are closest to the real deal.

- Run some more test images to check. Try a few really wacky prompts (including nudity) to ensure you've not baked in clothes, poses, expressions or background items.

- Run some good SFW images off as previews for Civitai and upload it there for everyone to download.
 

devilkkw

Member
Mar 17, 2021
323
1,093
This is good. thank you. i will try it.
I think that you can make your own Lora with 6GB vram yes. You just need to use low resolution 512,512 or maybe you need to go lower.
Rentry's I recommend to read if you decide to try it.



I used kohya_ss to make mine.
Thank you for link, inspect it and try.
 

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
I have made a few TIs (downloadable from ) - some people run them high learning rate to start with, then turn it down massively as it starts to produce good results. Frankly they always look a bit off or rushed to me.
I have a fairly standard 'recipe' for a photorealistic-type TI:

- At least 60 images. Good ones. Varied poses, clothes and, especially, expressions. Try to get a face in profile or two. Some full body, some close-up faces. Curate them well and ensure you manually crop and resize them to 512x512. Don't use automated tools, they're all shit! MS Paint is fine. Ideally, have over 100 images. Don't upscale shit photos, go looking for a better quality original instead. All this takes time. It matters though. Don't bake a cake with mouldy flour and rotten eggs.

- Some guides recommend the mirroring option to double the number of images. This is fine if you're training on an object, but how many people have a truly symmetrical face? You'll just make them look a bit weird. Don't use this option.

- Use a completely unambiguous name and token for your embedding e.g. for Kylie Minogue I used "KYL13M". That way SD won't try to use its default Kylie training which looks nothing like her. No chance of any influence.

- A learning rate of 0.0015. I don't vary it, seems OK for me. It's pretty low so you shouldn't overtrain. Overtraining is mostly an issue for the impatient who try to rush it.

- 12-20 Vectors per token. No less than 12 for a person, ensure you have at least 5 images per vector. Don't bother with more than 20. I once tried 40, the law of diminishing returns kicked in.

- Use SD1.5 as the base model for training to give optimum applicability across other models.

- Set 'subject' instead of 'style'.

- Set a good prompt in the txt2img tab - one you would probably use when generating the finished product. Avoid weightings though, keep it all unweighted. Avoid LoRAs or other embeddings too if you can. Set it to preview (and save an embedding) every 500 or 1000 steps. Give it a fixed seed so you're always generating previews on the same prompt and seed.

- Set the steps limit to 30,000.

- Hit 'Train embedding', open the preview images folder and find something else to do for several hours(!)

- Your previews will be terrible, SD1.5 is actually an awful model for photorealistic people. You should still be able to find the point where it really starts to settle down though, usually around 17k steps or more.

- Copy the relevant embeddings (the .pt files, suffixed "-n" where n is the no of steps) for those previews that seem best into the main \embeddings folder.

- Set up scripting X/Y/Z plot with prompt S/R to switch from KYL13M-18000 to KYL13M-19000 to KYL13M-20000 etc. Run a quick test in your model of choice NOT SD1.5 itself. A couple of images for each draft embedding on test, with a fixed seed so it reuses the same couple of seeds each time.

- Compare the results to see which is best. Remember, if you've spent long enough curating the images, the not-Artificial Intelligence in your brain will also be trained on the subject! You should inherebtly know which are closest to the real deal.

- Run some more test images to check. Try a few really wacky prompts (including nudity) to ensure you've not baked in clothes, poses, expressions or background items.

- Run some good SFW images off as previews for Civitai and upload it there for everyone to download.
BTW this was intended more as a 'TIs for Dummies' and/or a brain-dump of my workflow rather than any attempt to patronise you devilkkw, you've obviously made some of your own so know much of this already.

As you can probably see though, to me the quality of the result is as much from the preparation of the training data and the QC checking of the results than the actual training itself.
 

devilkkw

Member
Mar 17, 2021
323
1,093
Is just try to be better, for some model i get god result with setting i posted, but as i look at your seem much better,so i'm testing it now.
Also preparing image is a time spending, but if you want good result you have to do it.
I have ready set so i'm triyng your setting now. 3 hours i think is good for 30000 step.
 

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
Is just try to be better, for some model i get god result with setting i posted, but as i look at your seem much better,so i'm testing it now.
Also preparing image is a time spending, but if you want good result you have to do it.
I have ready set so i'm triyng your setting now. 3 hours i think is good for 30000 step.
Please, please let me know your results - I am no expert, my 'recipe' is just what has worked for me so far. I don't know if there's something over-trained in my embeddings or that otherwise causes issues. Any and all feedback is greatly appreciated, even if it's just that you've found nothing weird and it produces flexible models.
 

devilkkw

Member
Mar 17, 2021
323
1,093
Jimwalrus i have done some test, and for what i see, 30000 step tend to do chromatic aberration at mid cfg.
so i decide to try different train, and i finish to get my best at 3000 step.
I share setting, maybe if you want to try.

15-20 images good quality, close-up and full body (i use 768x768)

Create embedding:
Number of vectors per token : number of image/2.2 (rounded at high value)

Train setting:
Gradient Clipping :norm
Batch size : 1 or 2 (depends on vram)
Gradient accumulation steps : 1
Embedding Learning rate : 0.005:100, 3.09:500, 1.8:700, 2.06:900, 3.269:1000, 1.05:1500, 0.06:2200, 0.9
Max steps : 3000

With these setting i get good result in about 30 mins, and usable TI from low to high cfg.

I made different ti for testing with same setting on different model, for what i see do a train with f222 model get better result for realistic.
 

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
Jimwalrus i have done some test, and for what i see, 30000 step tend to do chromatic aberration at mid cfg.
so i decide to try different train, and i finish to get my best at 3000 step.
I share setting, maybe if you want to try.

15-20 images good quality, close-up and full body (i use 768x768)

Create embedding:
Number of vectors per token : number of image/2.2 (rounded at high value)

Train setting:
Gradient Clipping :norm
Batch size : 1 or 2 (depends on vram)
Gradient accumulation steps : 1
Embedding Learning rate : 0.005:100, 3.09:500, 1.8:700, 2.06:900, 3.269:1000, 1.05:1500, 0.06:2200, 0.9
Max steps : 3000

With these setting i get good result in about 30 mins, and usable TI from low to high cfg.

I made different ti for testing with same setting on different model, for what i see do a train with f222 model get better result for realistic.
Thanks a lot for this, I'll be giving some or all of these a try.
The 30k steps in my original 'recipe' was only intended as a backstop, I generally find best results with my settings at around 18k-25k, usually ~21k.
 

devilkkw

Member
Mar 17, 2021
323
1,093
i saved all train at 1000 step, the 19k give me good result, but the problem is the same.
Maybe is possible problem come with models used for test, on standard sd1.5 works great, but as you know not much good result in composition.
Let me know your impression if you test my setting. thank you.
 

Sepheyer

Well-Known Member
Dec 21, 2020
1,570
3,767
Anyone tried erotic story generators? Any recommendations?

I tried

Spicy.

Let's see if getting AI to write erotic stories generates enough interest to start its own thread.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: VanMortis

Davox

Well-Known Member
Jul 15, 2017
1,533
2,330
Here are a few of mine, trying the realistic look, no inpainting or messing around .

Keen to see if you think I'm doing anything dumb with the prompts

00112-3849463294.png
You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:
  • Like
Reactions: Mr-Fox