Flux.1 Quantization Quality: BNB nf4 vs GGUF-Q8 vs FP16

Posted by Iory1998@reddit | LocalLLaMA | View on Reddit | 92 comments

Hello guys,

I quickly ran a test comparing the various Flux.1 Quantized models against the full precision model, and to make story short, the GGUF-Q8 is 99% identical to the FP16 requiring half the VRAM. Just use it.

I used ForgeUI (Commit hash: 2f0555f7dc3f2d06b3a3cc238a4fa2b72e11e28d) to run this comparative test. The models in questions are:

  1. flux1-dev-bnb-nf4-v2.safetensors available at https://huggingface.co/lllyasviel/flux1-dev-bnb-nf4/tree/main.
  2. flux1Dev_v10.safetensors available at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main flux1.
  3. dev-Q8_0.gguf available at https://huggingface.co/city96/FLUX.1-dev-gguf/tree/main.

The comparison is mainly related to quality of the image generated. Both the Q8 GGUF and FP16 the same quality without any noticeable loss in quality, while the BNB nf4 suffers from noticeable quality loss. Attached is a set of images for your reference.

GGUF Q8 is the winner. It's faster and more accurate than the nf4, requires less VRAM, and is 1GB larger in size. Meanwhile, the fp16 requires about 22GB of VRAM, is almost 23.5 of wasted disk space and is identical to the GGUF.

The fist set of images clearly demonstrate what I mean by quality. You can see both GGUF and fp16 generated realistic gold dust, while the nf4 generate dust that looks fake. It doesn't follow the prompt as well as the other versions.

I feel like this example demonstrate visually how GGUF_Q8 is a great quantization method.

Please share with me your thoughts and experiences.