1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-24 20:59:27 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
jiqing-feng
907c0c2c76 Implement _dequantize for TorchAO quantizer (#13538)
* Implement _dequantize for TorchAO quantizer

- Add _dequantize() method in TorchAoHfQuantizer that dequantizes
  TorchAOBaseTensor weights back to standard nn.Parameter
- Fix _verify_if_layer_quantized to check isinstance(weight, TorchAOBaseTensor)
  so dequantized layers are correctly detected as non-quantized

* enable dequantize for TorchAO tester mixin

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>

* check dequantize

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>

* fix dequantize: clear is_quantized flag and cast dtype after dequantize

* fix

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>

* fix error report

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>
2026-05-18 18:39:50 +05:30
jiqing-feng
2f4a7177f0 Fix training gradient underflow in quantization tests (#13539)
* 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>
2026-05-18 15:20:07 +05:30
Sayak Paul
5fd27277b8 [tests] fix bitsandbytes compile tests for flux. (#13750)
fix bitsandbytes compile tests for flux.
2026-05-15 14:24:15 +09:00
jiqing-feng
8ee10d8536 Enable TorchAO int4wo quantization tests on XPU (#13537)
* Enable TorchAO int4wo quantization tests on XPU

- Remove _int4wo_skip marker that restricted int4wo tests to CUDA only
- Add XPU-specific int4_packing_format='plain_int32' for Int4WeightOnlyConfig

* add xpu to not skip

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>

* Apply style fixes

---------

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-06 12:31:49 +09:00
Dhruv Nair
50987b1290 [CI] Fix BnB tests (#13481)
* update

* update

* update
2026-04-22 13:19:32 +05:30
Howard Zhang
1fe2125802 remove str option for quantization config in torchao (#13291)
* remove str option for quantization config in torchao

* Apply style fixes

* minor fixes

* Added AOBaseConfig docs to torchao.md

* minor fixes for removing str option torchao

* minor change to add back int and uint check

* minor fixes

* minor fixes to tests

* Update tests/quantization/torchao/test_torchao.py

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* Update docs/source/en/quantization/torchao.md

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* Update tests/quantization/torchao/test_torchao.py

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* version=2 update to test_torchao.py

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-03-27 08:52:37 +05:30
Sayak Paul
35086ac06a [core] support device type device_maps to work with offloading. (#12811)
* support device type device_maps to work with offloading.

* add tests.

* fix tests

* skip tests where it's not supported.

* empty

* up

* up

* fix allegro.
2026-02-16 16:31:45 +05:30
Dhruv Nair
c3a4cd14b8 [CI] Refactor Wan Model Tests (#13082)
* update

* update

* update

* update

* update

* update

* update

* update
2026-02-11 14:42:58 +05:30
Dhruv Nair
0b76728e27 Refactor Model Tests (#12822)
* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-02-02 18:51:44 +05:30