--- base_model: black-forest-labs/FLUX.1-dev library_name: diffusers license: other license_name: flux-1-dev-non-commercial-license license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md pipeline_tag: text-to-image tags: - flux - text-to-image - quantized - fp8 - e4m3 - diffusers base_model_relation: quantized --- # FLUX.1-dev-e4m3 FP8 (e4m3) dynamically-quantized [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev), saved as a complete `FluxPipeline`. ## What was changed Every double and single transformer block of the `FluxTransformer2DModel` is quantized to `e4m3_e4m3_dynamic` — `float8_e4m3fn` weights with dynamically scaled `float8_e4m3fn` activations. The rest of the pipeline is unchanged: the transformer's non-block tensors, the CLIP text encoder and the VAE stay in fp16, and the T5 text encoder stays in bf16. The transformer shrinks from ~23.8 GB to ~12.0 GB. This is the same recipe as [`wavespeed/FLUX.1-dev-int8`](https://huggingface.co/wavespeed/FLUX.1-dev-int8) with an fp8 rather than int8 numeric format. FP8 matmul needs Hopper (H100/H200) or newer; on Ada and older the weights dequantize instead and you lose the speedup. Quantization was done with WaveSpeed's `xelerate.ao.quantize`. Weights are stored as pickled `.bin` shards, so loading requires `use_safetensors=False`. ## Usage ```python import torch from diffusers import FluxPipeline pipe = FluxPipeline.from_pretrained( "wavespeed/FLUX.1-dev-e4m3", torch_dtype=torch.float16, use_safetensors=False, ).to("cuda") ``` ## License Derived from FLUX.1-dev, so the [FLUX.1 \[dev\] Non-Commercial License](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) applies to these weights and to anything generated with them. Not for commercial use.