[Stable Diffusion] Prompt Sharing and Learning Thread

Synalon

Member
Jan 31, 2022
208
631
Hey. Whats the best model to use training lora?
That would depend on what checkpoint you intend to use it with.

If you want to use it mostly with checkpoints trained on SD1.5 then use SD1.5, if you use mostly XL checkpoints use SDXL.

If you only ever use 1 checkpoint then just train on that.
 

Halmes

Newbie
May 22, 2017
18
6
Im using google colab to train. I have 735 pics. How many repeats and epochs should i do? 10 epochs, 3 batch, 10 repats says too much steps.
 

devilkkw

Member
Mar 17, 2021
303
1,033
What are you training? Style or subject?
700 is really too many pics.
I'm speaking about sd1.5 . In mostly case i use max 20 image, 18 steps and 4 epoch, for subject, and 36 step and 3 epoch for style.
I'm unable to test sdxl, train sdxl lora on 6gb is impossible, or maybe i don't know the correct way.
 
  • Like
Reactions: VanMortis

felldude

Active Member
Aug 26, 2017
505
1,500
Im using google colab to train. I have 735 pics. How many repeats and epochs should i do? 10 epochs, 3 batch, 10 repats says too much steps.
I would look at the mean ar error (without repeats) with that many images. If it is in the 100th decimal your probably ok
(I have locally trained high error lora's in the 10ths for ar error, I think I trained 680 images with an AR error of 0.4)

Train on the EMA checkpoint if you can for (I can't find the un-pruned EMA checkpoint anymore)
The XL EMA weights I recall being 16GB I can not find the checkpoint anymore.

EMA is more important for refinement then for a LORA.
Unless your training a style, the base EMA model produces a lora with wider range.

You could do a batch size of 4 and probably 4 epochs as your well over 10,000 steps
 
Last edited:
  • Like
Reactions: VanMortis

Halmes

Newbie
May 22, 2017
18
6
I would look at the mean ar error (without repeats) with that many images. If it is in the 100th decimal your probably ok
(I have locally trained high error lora's in the 10ths for ar error, I think I trained 680 images with an AR error of 0.4)

Train on the EMA checkpoint if you can for (I can't find the un-pruned EMA checkpoint anymore)
The XL EMA weights I recall being 16GB I can not find the checkpoint anymore.

EMA is more important for refinement then for a LORA.
Unless your training a style, the base EMA model produces a lora with wider range.

You could do a batch size of 4 and probably 4 epochs as your well over 10,000 steps
Im training with this
 

Halmes

Newbie
May 22, 2017
18
6
I would look at the mean ar error (without repeats) with that many images. If it is in the 100th decimal your probably ok
(I have locally trained high error lora's in the 10ths for ar error, I think I trained 680 images with an AR error of 0.4)

Train on the EMA checkpoint if you can for (I can't find the un-pruned EMA checkpoint anymore)
The XL EMA weights I recall being 16GB I can not find the checkpoint anymore.

EMA is more important for refinement then for a LORA.
Unless your training a style, the base EMA model produces a lora with wider range.

You could do a batch size of 4 and probably 4 epochs as your well over 10,000 steps
Shold i change to the sd training model too?
 

Halmes

Newbie
May 22, 2017
18
6
I would look at the mean ar error (without repeats) with that many images. If it is in the 100th decimal your probably ok
(I have locally trained high error lora's in the 10ths for ar error, I think I trained 680 images with an AR error of 0.4)

Train on the EMA checkpoint if you can for (I can't find the un-pruned EMA checkpoint anymore)
The XL EMA weights I recall being 16GB I can not find the checkpoint anymore.

EMA is more important for refinement then for a LORA.
Unless your training a style, the base EMA model produces a lora with wider range.

You could do a batch size of 4 and probably 4 epochs as your well over 10,000 steps
Think the problem is the paywall in google colab
 

felldude

Active Member
Aug 26, 2017
505
1,500
Think the problem is the paywall in google colab
Based off of the error message your trying to use CPU training and need to

The drop down your showing is non EMA base checkpoint so in that case I would just use what ever model is closest to the style your going for.

With an image count that high you might want to lower the LR to 1e-6 for the U-NET and 5e-7 for the TE
 

Halmes

Newbie
May 22, 2017
18
6
Based off of the error message your trying to use CPU training and need to

The drop down your showing is non EMA base checkpoint so in that case I would just use what ever model is closest to the style your going for.

With an image count that high you might want to lower the LR to 1e-6 for the U-NET and 5e-7 for the TE
GPU connection cannot be established due to Colab usage
says this. So i have to pay to use gpu more.
I changed google account but now it says " An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu. "
 
Last edited:

DrPepper808

Newbie
Dec 7, 2021
78
45
I just started playing with this, its been a lot of fun. I have three questions.
1) lets say I have a prompt in txt2img and I create 25 images, and one is Perfect the other 24 not so much. is there a way to take that one image and train SD to do a better job with the same prompt?
2) I used a Lora to lock in the face, but also need to lock in the cloths so I can try my hand at making a game. Is there a way to lock those in>
3) if I want a image without a background for ez import to renpy is there a prompt for that?
 

devilkkw

Member
Mar 17, 2021
303
1,033
I just started playing with this, its been a lot of fun. I have three questions.
1) lets say I have a prompt in txt2img and I create 25 images, and one is Perfect the other 24 not so much. is there a way to take that one image and train SD to do a better job with the same prompt?
2) I used a Lora to lock in the face, but also need to lock in the cloths so I can try my hand at making a game. Is there a way to lock those in>
3) if I want a image without a background for ez import to renpy is there a prompt for that?
What UI are you using?
 

devilkkw

Member
Mar 17, 2021
303
1,033
i've used a1111 for many time, but i've switched to CUI.
So some possible answer:
1) you can train Lora with result image, but result is not sure. Lora train is not so simple, understanding every value for training, and all settings is not so simple in the begins, but you can try and see. Experimenting is the way. For train lora i suggest to use
2) in the same way for face, you can use lora for dress.
3) not prompt, there are some extensions doing it, but i checked it only on CUI, i can't point to right extensions for a1111 because i never checked on it.

A1111 is good and i had a fun for many time, but CUI is more powerfull for me, that node UI permit some workflow that is so difficult to remake in a1111. But this is my opinion, there are many skilled people's and everyone work good on UI they use.
 
  • Like
Reactions: Jimwalrus

felldude

Active Member
Aug 26, 2017
505
1,500
I trained a lora with AdamW8 Bit on Pony using Civitai, my 2048 trainings on base Pony kept failing so I used my custom model to train, unfortunately that is limited to 1024x1024 a size I can do locally but eh I'd rather not tie up my machine for 12 hours vs 10 minutes for SD 1.5

Without chubby lora

ComfyUI_01009_.png

With Chubby Lora


ComfyUI_01002_.png
 
  • Like
Reactions: devilkkw

DrPepper808

Newbie
Dec 7, 2021
78
45
i've used a1111 for many time, but i've switched to CUI.
So some possible answer:
1) you can train Lora with result image, but result is not sure. Lora train is not so simple, understanding every value for training, and all settings is not so simple in the begins, but you can try and see. Experimenting is the way. For train lora i suggest to use
2) in the same way for face, you can use lora for dress.
3) not prompt, there are some extensions doing it, but i checked it only on CUI, i can't point to right extensions for a1111 because i never checked on it.

A1111 is good and i had a fun for many time, but CUI is more powerfull for me, that node UI permit some workflow that is so difficult to remake in a1111. But this is my opinion, there are many skilled people's and everyone work good on UI they use.
when you say CUI do you mean ComfyUI? I just started looking into ComfyUI, seems like what I was looking for.
 

devilkkw

Member
Mar 17, 2021
303
1,033
Yes, CUI mean Comfyui.
Actually I'm not a PC, but if you start using it I suggest to add ComfyUi Manager. You find link for downloading by search it on Google.
If you like it, and want to try it I will share my workflow for removing background when I'm at my PC.
 
  • Like
Reactions: DrPepper808