Add the flux model for image generation. (#2390)

* Add the flux autoencoder.

* Add the encoder down-blocks.

* Upsampling in the decoder.

* Sketch the flow matching model.

* More flux model.

* Add some of the positional embeddings.

* Add the rope embeddings.

* Add the sampling functions.

* Add the flux example.

* Fix the T5 bits.

* Proper T5 tokenizer.

* Clip encoder path fix.

* Get the clip embeddings.

* No configurable weights in layer norm.

* More weights related fixes.

* Yet another shape fix.

* DType fix.

* Fix a couple more shape issues.

* DType fixes.

* Fix the latent dims.

* Fix more shape issues.

* Autoencoder fixes.

* Get some generations out.

* Bugfix.

* T5 padding.

* Clippy fix.

* Add the decode only mode.

* Fix.

* More fixes.

* Finally get some generations to work.

* Add readme.
This commit is contained in:
Laurent Mazare
2024-08-04 07:14:33 +01:00
committed by GitHub
parent 0fcb40b229
commit 19db6b9723
8 changed files with 1346 additions and 0 deletions

View File

@ -17,6 +17,7 @@ pub mod efficientvit;
pub mod encodec;
pub mod eva2;
pub mod falcon;
pub mod flux;
pub mod gemma;
pub mod hiera;
pub mod jina_bert;