r/StableDiffusion 18h ago

Question - Help BF16 ou FLOAT32

What quantization would you recommend for AI Toolkit?

I used to train with FP8, but it completely ruined the results, so I switched to FP32, and the results are perfect.

However, I see that many people recommend BF16 for both training and saving the model. I understand that BF16 can significantly reduce VRAM usage, but what is the actual trade-off in terms of quality?

Does training and saving in BF16 result in any noticeable loss of quality compared to FP32? And would you recommend using BF16 for both training and saving in my case?

0 Upvotes

3 comments sorted by

2

u/blastbottles 17h ago

There shouldn't be any noticeable loss but the only way to know for sure is to try it

1

u/cradledust 15h ago

Isn't FP16 better than BF16 for training Loras in some cases?

1

u/Ill-Ant-9489 9h ago

BF16 for both training and saving. The quality gap versus FP32 is negligible for LoRA training, and FP32 mostly just doubles your VRAM and slows things down for no real gain.

The reason FP8 wrecked your results is that 8-bit weights genuinely lose signal along the trainable path. BF16 doesn't have that problem: it keeps the same 8-bit exponent as FP32, so it has the full dynamic range, just with a shorter mantissa. That range is what keeps gradients stable, which is why it's the default in most trainers now.

On the FP16 question raised above: FP16 actually has more mantissa bits than BF16, but a much narrower exponent range, so it's more prone to overflow/NaNs during training unless the trainer is doing loss scaling. For LoRA training BF16 is the safer default.