Skip to content
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

Training Not Fitting Properly and Plot Display Issues #95

Open
alittlebitfun opened this issue Nov 16, 2024 · 1 comment
Open

Training Not Fitting Properly and Plot Display Issues #95

alittlebitfun opened this issue Nov 16, 2024 · 1 comment

Comments

@alittlebitfun
Copy link

I noticed that when I used this repository, the example workflow couldn't achieve fitting. Even when I used the same parameters as I did in Kohya, the training results were still very poor. Despite repeatedly adjusting the parameters, I was still unable to achieve proper fitting.

Additionally, although the loss value changes normally, the plot often fails to display the line correctly and instead shows a horizontal straight line. It would also be great if the image inference during training could support weight adjustments.

@Andreas-Marx
Copy link

The example workflow does three training sessions (the blueish "LORA training xxx" groups). I even have expanded to four of these.

I then ran into problems, because I was tempted to have a first training session that trains the LoRA into a usable quality (450 steps), then three more sessions with 50-70 steps to find the sweet spot.
Turns out, that the shorter sessions actually decrease quality.

I think, this is due to cosine_with_restarts doing lr_scheduler_num_cycles restarts per training session.
You really should go for a reasonable number of epochs in each session. For 2 restarts, there should be at least 10 epochs.

Reduce the window-size parameter in the "Visualize Loss" nodes to see what's actually going on. I always set this value to average over roughly one epoch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants