Skip to content

Commit d35e77e

Browse files
committed
up
1 parent 5d08150 commit d35e77e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffusers/quantizers/nunchaku/nunchaku_quantizer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ class NunchakuQuantizer(DiffusersQuantizer):
3838
requires_calibration = False
3939
required_packages = ["nunchaku", "accelerate"]
4040

41-
dtype_map = {"int4": torch.int8}
42-
if is_fp8_available():
43-
dtype_map = {"nvfp4": torch.float8_e4m3fn}
44-
4541
def __init__(self, quantization_config, **kwargs):
4642
super().__init__(quantization_config, **kwargs)
43+
dtype_map = {"int4": torch.int8}
44+
if is_fp8_available():
45+
dtype_map = {"nvfp4": torch.float8_e4m3fn}
46+
self.dtype_map = dtype_map
4747

4848
def validate_environment(self, *args, **kwargs):
4949
if not torch.cuda.is_available():

0 commit comments

Comments
 (0)