Flux2klein Onboarding#445
Conversation
e4e7f55 to
8a38bd9
Compare
b22d0ce to
a67c8b7
Compare
48b898f to
20a03d2
Compare
f446205 to
56e6a4d
Compare
There was a problem hiding this comment.
I still see a few print statement instead of max_logging, but I think it's fine for now, we can send out a small PR for that later. RN let's prioritize merging the model onboarding PR.
I was able to reproduce the same e2e generation time as reported.
|
🤖 Hi @eltsai, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @eltsai, but I was unable to process your request. Please see the logs for more details. |
|
Seems like the linter test failed because of #443 , but #443 itself passed the linter tests, @syhuang22 is investigating it now |
entrpn
left a comment
There was a problem hiding this comment.
left some comments + please change all print statements to max_logging instead.
2228825 to
3fecc8f
Compare
8b2f1c7 to
ea2603b
Compare
|
I see a |
This branch contains all of the code for onboarding the Flux2.Klein model into this repo. PR contains support for both the 4B and 9B model variants.
Images can be generated with:
python src/maxdiffusion/generate_flux2klein.py src/maxdiffusion/configs/base_flux2klein.ymlFor the 9B model, point to the corresponding .yml file
python src/maxdiffusion/generate_flux2klein.py src/maxdiffusion/configs/base_flux2klein_9B.ymlRunning this implementation on a v7-1 with FSDP=2 on Batch-size 8 (1024 by 1024) gives the following latency:
Some call-outs on the implementation:
src/maxdiffusion/generate_flux2klein.pyis the main user-facing file for running either the 4B and 9B files. It invokessrc/maxdiffusion/pipelines/flux/flux2klein_pipeline.py.src/maxdiffusion/models/flux/transformers/transformer_flux_flax.pyis heavily modified to add support for the new variants of the Attention blocks used in the Flux2.Klein models over the older generation of models.src/maxdiffusion/models/qwen3_flax.py