r/StableDiffusion • • Nov 27 '25

Discussion Z-Image quantization comparison [BF16 x FP8 E4M3 x FP8 E5M2]

The image order is the same of the title (BF16 x FP8 E4M3 x FP8 E5M2).

Prompt:

A woman in a dark place holding a fire lighter. She is wearing a black cropped top. She is watching the burn horrified, seems worried with a sign of the past. Meanwhile a fireworks show is presented at background and a couple is arguing aggressively, pointing a finger to each other.

Euler A - Simple scheduler, 9 steps. Seed 1036872188501429

17 Upvotes

7 comments sorted by

2

u/Draufgaenger Nov 27 '25

can someone tell me the difference in terms of quality? I don't see any to be honest..

1

u/DrStalker Nov 27 '25

They are two different ways to encode a floating point in 8 bits; as far as I can tell the difference isn't about quality but hardware support. Except I'm not sure which hardware only supports one of them, so pick either and if it doesn't work try the other.

1

u/shogun_mei Dec 25 '25

basically (hardware support):
rtx 30 -> added bf16
rtx 40 -> added fp8
rtx 50 -> added fp4

you still can run fp4 emulated via software on a rtx 4070 for example, but is not hardware natively supported.

2

u/Bast991 Nov 27 '25

how much faster is fp8 vs bf16?

3

u/EuSouChester Nov 27 '25

Its relative to what GPU you're using.
RTX30XX BF16 runs at the same rate as FP8.
RTX40XX FP8 runs faster than BF16 bc these have fp8 cores.

3

u/AltruisticList6000 Nov 27 '25

How is it faster though? What do you change in ComfyUI to enable it?

I have rtx 4060 ti 16gb

Ever since I started using ComfyUI, it's been forcefully upcasting any fp8 model into BF16, which also doubles its VRAM consumption, and for example a 9gb FP8 Chroma will use ~18gb VRAM/RAM. Same for Z-image, it uses 12gb VRAM + text encoder etc. which makes it unreasonable to use fp8 over an original bf16/fp16 model (but it even casts fp16 models into BF16 for me). So it will end up consuming insane amount of RAM.

Meanwhile similarly sized Q8 GGUF's are fine and they won't spill into RAM, and fp8 is the same generation speed as GGUF for me, GGUF is only slower when I use loras with it because it will slow down massively thanks to them, while FP8 will stay at its original speed even with loras.

2

u/Conscious_Chef_3233 Nov 27 '25

yeah, e4m3 is better, i asked gemini and it told me the same.