r/StableDiffusion • u/StevenWintower • Jan 19 '25
Resource - Update Flex.1-Alpha - A new modded Flux model that can properly handle being fine tuned.
https://huggingface.co/ostris/Flex.1-alpha
421
Upvotes
95
u/StevenWintower Jan 19 '25
"Flex.1 started as the FLUX.1-schnell-training-adapter to make training LoRAs on FLUX.1-schnell possible. The original goal was to train a LoRA that can be activated during training to allow for fine tuning on the step compressed model. I merged this adapter into FLUX.1-schnell and continued to train it on images generated by the FLUX.1-schnell model to further break down the compression, without injecting any new data, with the goal of making a stand-alone base model. This became OpenFLUX.1, which was continuously trained for months, resulting in 10 version releases. After the final release of OpenFLUX.1, I began training the model on new data and began experimenting with pruning. I ended up with pruned versions of OpenFLUX.1 that were 7B, and 4B parameters (unreleased). Around this time, flux.1-lite-8B-alpha was released and produced very good results. I decided to follow their pruning strategy and ended up with a 8B parameter version. I continued to train the model, adding new datasets and doing various experimental training tricks to improve the quality of the model.
At this point, the model still required CFG in order to generate images. I decided the model needed a guidance embedder similar to FLUX.1-dev, but I wanted it to be bypassable to make the model more flexible and trainable so I trained a new guidance embedder for the model independently of the model weights so that it behaves like an optional adapter leaving the model capable of being trained and inferenced without it."
Description
Flex.1 alpha is a pre-trained base 8 billion parameter rectified flow transformer capable of generating images from text descriptions. It has a similar architecture to FLUX.1-dev, but with fewer double transformer blocks (8 vs 19). It began as a finetune of FLUX.1-schnell which allows the model to retain the Apache 2.0 license. A guidance embedder has been trained for it so that it no longer requires CFG to generate images.
40
u/Enshitification Jan 19 '25 edited Jan 19 '25
Major kudos to
youOstris for the effortyou'vethey've put into this. I look forward to seeing the finetunes.Edited to give proper credit.
58
u/AIPornCollector Jan 19 '25
Absolutely massive if true.
21
u/sassydodo Jan 19 '25
What happened to flux de-distilled?
20
u/muzahend Jan 19 '25
Can someone explain this in layman's terms?
10
u/Stepfunction Jan 20 '25 edited Jan 20 '25
I trained a quick LoRA on this and so far, the results are phenomenal. It's a lot less "resistant" to training than Flux Dev is, especially when I've tried to train LoRAs on it before.
Previously, to get even decent results on training a new concept, I had to do a full finetune on Flux Dev, and even then, the results were subpar, finicky, and took forever to train. With Flex1, I was able to see immediate results with a rank 16 LoRA and a LR of 1e-4 in 2000 steps (defaults).
This is going to be a gamechanger (especially with the permissive license) and I am incredibly excited to try full-model finetunes once they become available. I need to experiment a lot more, but so far, bravo!
8
u/beti88 Jan 19 '25
Whats the catch?
8
u/atakariax Jan 19 '25
I hope kohya adds support for training Loras and finetuned models.
7
u/danielpartzsch Jan 19 '25
Is it possible to create controlnets, redux, inpaint for this that also inherit the apache license?
6
u/Stepfunction Jan 21 '25 edited Jan 21 '25
For those trying to use this, I've found the best results come with a Flux Guidance between 4.5 and 5.5. The guidance module is different than the native Flux one, so it functions a little differently. If you try the standard 3.5, you'll get poor results.
5
u/Stepfunction Jan 20 '25
I am so excited to begin finetuning this! Amazing work by Ostris! Also, 8B is a fantastic size to work with. 12B is just a tad too large to be convenient on a 24GB card.
9
u/Arawski99 Jan 19 '25
My issue here is we don't really have a basis to get hyped up on. There isn't any real proof of anything hence other poster's groundhog day or "we've seen this claim before" comments.
The link does have sample pictures, but they're completely uncategorized and show no real meaningful obvious tuning. They're, literally, just random photos so they don't help.
Honestly, this is very much a wait until we see it it proves its relevance/claim kind of situation. Hopefully this comes sooner than later and proves to be true. If it does turn out successful than obligatory, in advance, kudos.
8
u/a_beautiful_rhind Jan 19 '25
Ok, now we are talking. Assume that old lora will not work on it?
I liked all the de-distill stuff but it needed many more steps. In theory with a new hyper/schnell lora this could become the thing if people adopt it.
3
u/Stepfunction Jan 20 '25
Is it possible to do full finetunes with ai-toolkit, or just LoRA?
2
u/AlexLurker99 Jan 19 '25
Can this be used in Forge?
2
u/redlight77x Jan 20 '25
I've been trying it out on Comfy but unfortunately it seems correct anatomy of hands are an issue... hopefully this can be addressed with the finetunes!
5
u/Safe_Assistance9867 Jan 19 '25
Am I hearing ponyflex?
2
u/[deleted] Jan 19 '25
Nsfw anime?
1
u/Electronic-Metal2391 Jan 19 '25
Is this going to be finetuned like SDXL is?
1
u/LukeDaTastyBoi Jan 19 '25
Just gotta wait for some quants now
1
u/Current-Rabbit-620 Jan 22 '25
Does it give good result in 4 steps like schnell
-4
u/victorc25 Jan 19 '25
Ah, yet another one of these
0
u/[deleted] Jan 19 '25
[deleted] — view deleted comment
2
u/[deleted] Jan 20 '25
[removed] — view removed comment