fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

since introducing training multiple subjects, this repo and shiv repo gets bad results

Open 1blackbar opened this issue 3 years ago • 13 comments

Me and other people noticed that new code introduced in last 2 days now makes the results worse than it was before , something happened maybe in the main diffusers branch, its hard to tell what but the difference is noticeable, subjects likeness is all over the place, fatter faces and not really that close, its pretty weird

1blackbar avatar Oct 24 '22 23:10 1blackbar

Maybe it's related to change with learning rate " - --learning_rate=2e-6 \\n", "+ --learning_rate=1e-6 \\n",

You'd have to swap manually learning rate back and see if thats the culprit

x02Sylvie avatar Oct 24 '22 23:10 x02Sylvie

the text encoder training doesn't make thing worse, it makes things more efficient, you don't need 4000 steps anymore, you only need 1600 steps, if you go over it you will overtrain it

I trained it on 2 subjects :

197557015-e5404f61-f4e9-403d-91d3-8e1dfd4c1f34 download (3) download (4) download (6) download (7)

TheLastBen avatar Oct 25 '22 03:10 TheLastBen

What is "overtraining"? What unwanted thing results from it? Thanks.

nfrhtp avatar Oct 25 '22 08:10 nfrhtp

@nfrhtp overtraining will lead to generating exactly the images used for training

TheLastBen avatar Oct 25 '22 08:10 TheLastBen

New better, faster method incoming, it will be ready in a few hour

TheLastBen avatar Oct 25 '22 09:10 TheLastBen

well, i keep track of overtraining on shiv repo easily by looking at the 4 samples after model gets saved each 400 steps until 3200 and it takes like 10 seconds to see if the likeness and stylisation are ready, on this repo to do that and run the webui to test models is taking a lot of time. I noticed on his repo with 20 imgs and 2400 steps i get amost overfitting but still very stylisable , so thats the sweet spot for me atm with his rate, but with this repo i used 1700 and it did not work with all subjects so im still looking for best settings. Especialy now that its 1e-6 and not 2e-6.

1blackbar avatar Oct 25 '22 20:10 1blackbar

use the new method

TheLastBen avatar Oct 25 '22 21:10 TheLastBen

I just did 1500 and its not enough for 2 people , maybe i shoud double the steps so if i used 1500 i should go for 3000 ? but the results are not really good, deformed faces. Defaults definitely dont work for me, why its suddenly just 600 steps ? This is just not enough

1blackbar avatar Oct 25 '22 21:10 1blackbar

I'm saying it's good because I tried it the first two are the default ones and the last two are trained with 600 steps

or 600s 600s orem

600s

600s d

TheLastBen avatar Oct 25 '22 21:10 TheLastBen

These look very good, 30 imgs each and 600 steps ? Theres little room for error if i dont change defauts 1e-6 , my files are named person_man_krb(number).jpg

1blackbar avatar Oct 25 '22 22:10 1blackbar

"person_man_krb(number).jpg" that's the problem, with that name, you're destroying the class person and the class man. you must use only the instance name in the files names : krb(1).jpg .... krb(2).jpg .... etc

TheLastBen avatar Oct 25 '22 22:10 TheLastBen

the whole method is based on the images filenames which should be only one random unknown keyword, fix that and train for 2000 steps use this negative prompt :

((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))

TheLastBen avatar Oct 25 '22 22:10 TheLastBen

I trained 3 subjects at x1500 steps for each subject.

image

toyxyz avatar Oct 28 '22 08:10 toyxyz