We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a8a489 commit 915fdb5Copy full SHA for 915fdb5
1 file changed
comfy/ops.py
@@ -264,10 +264,14 @@ def fp8_linear(self, input):
264
scale_input = self.scale_input
265
if scale_weight is None:
266
scale_weight = torch.ones((), device=input.device, dtype=torch.float32)
267
+ else:
268
+ scale_weight = scale_weight.to(input.device)
269
+
270
if scale_input is None:
271
scale_input = torch.ones((), device=input.device, dtype=torch.float32)
272
inn = input.reshape(-1, input.shape[2]).to(dtype)
273
else:
274
+ scale_input = scale_input.to(input.device)
275
inn = (input * (1.0 / scale_input).to(input.dtype)).reshape(-1, input.shape[2]).to(dtype)
276
277
if bias is not None:
0 commit comments