-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update train_lora_flux_24gb.yaml #69
base: main
Are you sure you want to change the base?
Conversation
1e-4 looks too low for my tests, 2e-4 and 2000 steps seems to result in much better resemblance (training with ~20 photos of a person)
To be honest, in my case even 1e-4 at 500 steps is sufficient to tune person-based LORA. |
I agree it's true that 500 steps already magically converges unlike SDXL, but more is needed IMO to reach a satisfy-able LoRA that's weighted enough, I just think for people trying first time 2e-4 might result in a more satisfying result. |
Depending on the optimizer and scheduler you use, you can achieve faster/better results. |
It's mainly about the default config, I'm sure there's lots of parameters to tune. But I'm concerned people try it out and then are disappointed with the results, better to lean towards a little over training than under training in that case. |
do you have any suggestions? |
i just saw your reply, sorry for the delay. |
@WarAnakin polynomial scheduler sounds really promising. We you willing to share the related code in PR or in your forked repository, please? |
yes, i'll do that now, you only need 1 file to update |
This one's for you: https://github.com/WarAnakin/ai-toolkit/blob/main/toolkit/scheduler.py You don't need the whole thing, just replace scheduler.py file with mine, in the /toolkit folder. |
@D-Ogi please don't forget to add the following line of code to the config file |
Mind that if you don't specify |
Thank you both. I tested the |
That makes sense, as a linear progression will start with the LR you specified and linearly lower through 0 by the end, whereas by default configuration the LR you specify is constant across the whole run. lr: 4e-4
lr_scheduler: "polynomial"
lr_scheduler_params:
power: 0.4 |
thanks for pointing that out also, you guys might want to know that training the text encoder for loras is now possible using CLIP_L |
@WarAnakin I tried using your configuration and did get better results. However, when I restore the fine-tuned checkpoint, my images don’t look the same as they did with the training checkpoints. |
I don't understand. What do you mean by restore a checkpoint ? |
I have finetunned flux.1-schnell with the learning rate set to 0.004, the results did improve on the samples generated during the training, but when I load the flux + lora to generate images the result is completely different |
1e-4 looks too low for my tests, 2e-4 and 2000 steps seems to result in much better resemblance (training with ~20 photos of a person).
Close it if you don't agree, was not sure if the 1e-4 has been tested with the new linear_timesteps: true (?)