training config

#7
by kalle07 - opened

do you have train setup for flux-klein?
i have trained a character before, that was ok,
10 images, lr .0001, adam, rank32, 2000step

but for image edit modus
for a start i have 20 control an 20 target images.
those parameter dont work

Hello, for Flux Klein the rank used was 128 and the other was 64. Normally, at the beginning I train with low noise, then as the training progresses I stop and change according to the results I obtain from the samples. I used a total of about 300 pairs of images or more, during 3500 steps. The training resolution also changed during the training; at the beginning low resolution 256, 512 and closer to the end I change to 1024, 1536. Flux Klein was easy to train because it already does some kind of head swap, but other models can be more complicated. The more samples and the more variability, the better.

sounds anyway complicate , if you change the train setup until the train end (noise, resolution) ...
you train with? onetrain? kohya, aitoolkit ???

I trained on all these versions using ai-toolkit.

Previously, I used Kohya, now I use also AI Toolkit...
As I said, only 25 image pairs for now, but what needs to be “learned” is minimal. Similar to you, “flux-klein” can already do this quite well (input low resolution, output high resolution). do you think at step ~300 i must be able to see if it starts to work?
One question: should the loss/loss curve tend to decrease with ongoing training? So I can stop immediately after 10-50 steps if the curve only rises? If it decreases, how much should it decrease to?
Still strange that my character was relatively okay with 20 images and 1000 steps... but now with the image pairs, I've been testing for 3 days already. ^^

It's not quite that simple. The idea of ​​"if it goes up in the first 50 steps I can stop" isn't quite accurate. The curve will go up and down several times; what's not acceptable is for it to only go up the entire time, nor should it remain stable at the same level for too long. 90% of the success of your training depends on your dataset. If it has the same pattern in all your samples, it will work out in the end. It's also important to have the same dimensions. Avoid training, for example, control/image_1.png (1024x1024) and target/image_1.png (512x1024). Another thing, my focus is that below a loss of 0.10 I already start thinking about stopping. A very low loss may indicate overfitting, and a very high loss may indicate either a lack of samples in your dataset or something is wrong at the configuration level. I always train all my models with more than 100 samples, whether simple images or pairs, always more than 100, sometimes with detailed captions, sometimes with captions in instruction format (this is good for editing models) teaching what it needs to do with the image, and often with a simple trigger word. In short, if your training isn't working, it's because something is wrong with your dataset, either because there are too few samples, or because there are incorrect dimensions, or because the captions are unclear, or because it's a very random dataset without any pattern.

THY!
yeah a lot of train is depend on the dataset, i know ... trained a lot flux1 and sdxl.
for the rank iam only on 32, higher is to much for my hardware (need more vram for train).
and for my understanding the higher the rank the less important your prompt like the turbo models (flux2) rank 256 or 512
i will try more ... and it still starts with "klein" ... ;)

Sign up or log in to comment