mirror of
https://github.com/huggingface/diffusers.git
synced 2026-06-12 01:19:24 +08:00
* Fix training gradient underflow in quantization tests Change autocast dtype from float16 to bfloat16 in _test_quantization_training. Float16's limited dynamic range causes gradients to underflow to zero when passing through quantized tensor subclass operations. * fix autocast dtype check Signed-off-by: jiqing-feng <jiqing.feng@intel.com> --------- Signed-off-by: jiqing-feng <jiqing.feng@intel.com> Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>