Skip to content

Commit 2a2f2a3

Browse files
committed
fix condition
1 parent fbccd40 commit 2a2f2a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compressed_tensors/quantization/quant_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ def model_dump(self, *args, **kwargs):
286286
def _convert_dtypes_in_dict(d):
287287
for k, v in d.items():
288288
if isinstance(v, torch.dtype):
289-
if k == "zp_dtype" and d.get("symmetric"):
289+
if (k == "zp_dtype" and d.get("symmetric")) or (
290+
k == "scale_dtype" and d.get("dynamic") in (True, "local")
291+
):
290292
d[k] = None
291293
else:
292294
d[k] = str(v).replace("torch.", "")

0 commit comments

Comments
 (0)