Skip to content

Commit cca5273

Browse files
Change from frombuffer to tensor for quant_conf
1 parent 4130be2 commit cca5273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def state_dict(self, *args, destination=None, prefix="", **kwargs):
636636
quant_conf = {"format": self.quant_format}
637637
if self._full_precision_mm:
638638
quant_conf["full_precision_matrix_mult"] = True
639-
sd["{}comfy_quant".format(prefix)] = torch.frombuffer(json.dumps(quant_conf).encode('utf-8'), dtype=torch.uint8)
639+
sd["{}comfy_quant".format(prefix)] = torch.tensor(list(json.dumps(quant_conf).encode('utf-8')), dtype=torch.uint8)
640640
return sd
641641

642642
def _forward(self, input, weight, bias):

0 commit comments

Comments
 (0)