-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
We were working some time on an way to create timestep distribution specific to any particular dataset used in training.
We tested it for last couple months using Derrian easy scripts trainer with hardcoded changes, but we're not familiar with sd-scripts structure enough to fully integrate that as toggleable feature on our own at the current point in time, hence feature request.
https://github.com/Anzhc/Timestep-Attention-and-other-shenanigans
Here we give code of functions structured roughly correctly for usage with variables in sd-scripts. Also examples how we implemented it in hardcoded way are included in repo (look into "Kohya file examples" folder).
It builds distribution based on received loss values, similar to this:

But unique to each dataset(as it's based on particular loss values received in scope of training).
In majority of cases it improved convergence speed and quality of outcome in our tests.
We also provide code for Loss Offset Curve feature that works with said distribution, can be scaled and scheduled. It also supposed to improve convergence speed.
Some experimental loss functions are included too, but those are really just experiments.