We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d08150 commit d35e77eCopy full SHA for d35e77e
src/diffusers/quantizers/nunchaku/nunchaku_quantizer.py
@@ -38,12 +38,12 @@ class NunchakuQuantizer(DiffusersQuantizer):
38
requires_calibration = False
39
required_packages = ["nunchaku", "accelerate"]
40
41
- dtype_map = {"int4": torch.int8}
42
- if is_fp8_available():
43
- dtype_map = {"nvfp4": torch.float8_e4m3fn}
44
-
45
def __init__(self, quantization_config, **kwargs):
46
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
47
48
def validate_environment(self, *args, **kwargs):
49
if not torch.cuda.is_available():
0 commit comments