Change from frombuffer to tensor for quant_conf

This commit is contained in:
comfyanonymous 2026-01-05 03:34:24 -05:00 committed by GitHub
parent 4130be262e
commit cca52736d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -636,7 +636,7 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec
quant_conf = {"format": self.quant_format}
if self._full_precision_mm:
quant_conf["full_precision_matrix_mult"] = True
sd["{}comfy_quant".format(prefix)] = torch.frombuffer(json.dumps(quant_conf).encode('utf-8'), dtype=torch.uint8)
sd["{}comfy_quant".format(prefix)] = torch.tensor(list(json.dumps(quant_conf).encode('utf-8')), dtype=torch.uint8)
return sd
def _forward(self, input, weight, bias):