Home Creators Posts Import Register Favorites Logout

Content

FLUX LoRA training experiments with 256 images on 8x A6000 and 1x L40S GPUs: 80 epochs worked best, and doubling the learning rate for 8 GPUs overtrained.

Three trainings with Kohya configs, full workflow and conclusions: keep LR 0.0001 on 8 GPUs, avoid repeating clothing and backgrounds, use sharp images with varied expressions and distances. The model learned fine details, expressions and distant shots; grids are on Hugging Face.

Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.

Join discord to get help, chat, discuss and also tell me your discord username to get your special rank : SECourses Discord

Please also Star, Watch and Fork our Stable Diffusion & Generative AI  GitHub repository and join our Reddit subreddit and follow me on LinkedIn (my real profile)

Details

Main FLUX training thread that you need to follow : https://www.patreon.com/posts/110879657

Conclusions

  • Instead of 4 GPUs if you use 8 GPUs do not double learning rate, keep 0.0001 - double overtrains quickly

  • 256 images were too much since i had too many repeating clothing and especially backgrounds, so it overwritten the knowledge of the model a lot, thus overfit

    • So you should collect a perfect dataset that has different expressions, perspectives, distances, clothings but do not have similar or repeating ones as i did

    • Make sure that images sharpness, focus and lightning are as much as possibly perfect

  • It perfectly learnt every detail of the body and expressions that exists in the training dataset

  • The quality is astonishing for example below image is raw output

  • It can do the expressions that exists in the dataset perfectly as can be seen below

  • It can do distant shots very well as can be seen below all are raw images

  • It even learnt my broken teeth or forehead veins perfectly - learns even minor details

  • In the below given distant shot example the body shape pretty accurate, currently i am muscular and have some extra fat too :)

  • Since i had different hair lengths and styles in the training dataset, it generates mixed hairs sometimes or generate one of the style randomly

  • The studio shot images I got are just too amazing that no studio can take such shots that is the realism and quality

  • If you don't provide expression in the prompt, it sometimes generates perfectly fitting expression according to the scene and sometimes doesn't

  • If you generate images with big resolution like 1280x1280 or 1536x1536, you will get vertical or horizontal noticeable lines - looks bad

  • I shared 2x upscaled 18 example images on this Reddit post, please check all and also give an upvote I appreciate it very much : https://www.reddit.com/r/StableDiffusion/comments/1ffwvpo/tried_expressions_with_flux_lora_training_with_my/

  • When compared to 15 images training, the realism improved significantly (below grid)

 

Related posts

All posts in this topic: Research, Comparisons and Experiments · New to SECourses? Start Here: Best and Most Popular SECourses Posts

Files

Comments

Clinton

That is a lot of work! Thank you for all you do, sir.

SECourses

thank you for your support as well

Patrick Major

Really great work! I had done stuff like this for SD1.5 and XL LoRA training, took forever to figure out good settings. Your work is quite appreciated.

Robert Arsene

What about training with different resolution like 720x1280? Would that help with full body generations at that resolution?

Samuel

This is another story. ^^

SECourses

May help I haven't tested yet. Currently all are auto cropped to 1024*1024

Arcon Septim

So are you going to tell us afterwards what would be the ideal steps count, repetitions etc. for having 200 photos for training source? Also are you planning on creating a full flux checkpoint fine tune for certain model? Thanks

SECourses

yes i will share my experience after concluded. i may make a full fine tuning of flux i have such idea with 20k images

Sébastien Auger

Very nice new training! For me it’s the best you did 👍🏻 Reddit was right to force you to create another dataset wirh the critics, you proves that your parameters are very good, and that your work is of quality and that you listen to the community, bravo

Robert Morton

Is this only possible with high amounts of VRAM? Current restricted to 24GB for me

ZXM

Great work, thanks a lot. I got one quick question here, is it necessary to crop the data sets to 1024x1024? I think previously for SDXL, it seems no need to crop and kohya ss could support various resolution with the bucket option.

cool1

You said "I didn't caption them only ohwx man since captioning reduces likeliness and doesn't bring improvements.". If there was a pre-caption option and you entered "ohwx man" (or other specific name of the person) as well as having an auto-caption/manually editing them later, wouldn't that allow good likeness as well as allowing it to better know the full scene info? If the auto captions just say describe "a man.." and the describe look and scene then it won't be as specific as entering the precaption/manually entering the name of the person.

SECourses

i made this comparison with joy caption which really fully captions the image. the thing is that i didnt see any improvements in generalization. also even if i dont caption, since flux has internal captioning alike system, all my images are still getting effect of fully captioned

SECourses

i suggest this. first crop and have a baseline model. then you can try without cropping and enable bucketing and then compare. 1024 works great though

Patrick Major

I've done a tonne of testing using your rank 1 4x a6000 kohya settings with and without captions and have come to the same conclusion. Though I also like to train locally using the rank 8 or 9 depending on what I'm doing. In the higher rank files you have, the t5 encoder training is off. Would this then mean the captioning is way more important, or do you think the internal captioning still works? I haven't had time yet to train in that scenario and was wondering if you had... it would give to give guidance in the sense that if you want to skip the captioning use the lower rank training files with the t5 training on as the system auto captions and the higher rank ones need captions more?

SECourses

i think captioning makes minimal impact due to internal captioning, people tells that T5 impact is more important when you train text having images. i havent tested this yet

SECourses

i have trained higher res and it had some improvement but not much. bucketing higher res might help but i havent tested

Sonivas Sx

why when i train LoRa models are all around 1.5Gb big but when downloading Loras from civitai are 15-70Mb ? How can i reduce the size but keep the quality as high as possible?

SECourses

they are lower lora network rank - dimension. you can also lower lora rank, but it will reduce quality i tested

Shayne Colbert

I've Fine tuned flux dev using his fine tune settings with 4 different resolutions. 1024x1024, 896x1152, 832x1216 and 720x1280 with 100 images. Results seem good.