Text-to-Image
Diffusers
Safetensors
Flux2Pipeline
quantized
mxfp4
autoround
diffusion
autoquant-agent
Instructions to use INCModel3/FLUX.2-dev-MXFP4-RTN-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use INCModel3/FLUX.2-dev-MXFP4-RTN-AutoRound with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("INCModel3/FLUX.2-dev-MXFP4-RTN-AutoRound", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 2,064 Bytes
db9f182 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ---
base_model:
- black-forest-labs/FLUX.2-dev
pipeline_tag: text-to-image
license: other
tags:
- quantized
- mxfp4
- autoround
- diffusion
- text-to-image
- autoquant-agent
---
# FLUX.2-dev-MXFP4-RTN-AutoRound
## Model Details
This is a **MXFP4** (4-bit micro-scaling) quantization of [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev), a flagship text-to-image diffusion model. Generated by [AutoRound](https://github.com/intel/auto-round) with RTN (round-to-nearest, iters=0).
- **Base model:** [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev)
- **Quantization:** MXFP4 (W4A4), group_size=32
- **Method:** AutoRound RTN
- **Model size:** ~62 GB (vs ~110 GB bf16)
## Quantization Details
- **Scheme:** MXFP4 (data_type=mx_fp, bits=4, act_bits=4)
- **Group size:** 32
- **Export format:** auto_round (vllm-omni compatible)
- **Calibration:** coco2014, 28 steps, guidance 3.5
## Evaluation
Evaluated with vllm-omni diffusion harness (28 steps, guidance 3.5, 1024×1024, seed 42).
| Benchmark | BF16 Baseline | MXFP4 Quantized |
|---|---|---|
| DrawBench CLIP | 32.48 | 32.44 |
| DrawBench CLIP-IQA | 71.35 | 71.01 |
| DrawBench ImageReward | 1.15 | 1.11 |
| GenEval | 0.844 | 0.835 |
MXFP4 quantization is nearly lossless vs the BF16 baseline (GenEval 0.835 vs 0.844, CLIP 32.44 vs 32.48).
## Usage
```python
from vllm_omni.entrypoints.omni import Omni
from vllm_omni.inputs.data import OmniDiffusionSamplingParams
omni = Omni(model="INCModel3/FLUX.2-dev-MXFP4-RTN-AutoRound", mode="text-to-image")
params = OmniDiffusionSamplingParams(
height=1024, width=1024, seed=42,
guidance_scale=3.5, num_inference_steps=28, num_outputs_per_prompt=1,
)
out = omni.generate("a red bench in a park", sampling_params_list=[params])
```
## License
Please follow the license of the original model [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev).
_Produced with [autoquant-agent](https://github.com/) — agent-driven quantize + evaluate + self-heal._
|