1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00
This commit is contained in:
sayakpaul
2025-08-21 14:48:08 +05:30
parent 5d08150a2e
commit d35e77ece0

View File

@@ -38,12 +38,12 @@ class NunchakuQuantizer(DiffusersQuantizer):
requires_calibration = False
required_packages = ["nunchaku", "accelerate"]
dtype_map = {"int4": torch.int8}
if is_fp8_available():
dtype_map = {"nvfp4": torch.float8_e4m3fn}
def __init__(self, quantization_config, **kwargs):
super().__init__(quantization_config, **kwargs)
dtype_map = {"int4": torch.int8}
if is_fp8_available():
dtype_map = {"nvfp4": torch.float8_e4m3fn}
self.dtype_map = dtype_map
def validate_environment(self, *args, **kwargs):
if not torch.cuda.is_available():