From e140d3d4963ebf03afd37868a9e55e730b0b3285 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Fri, 12 Dec 2025 11:37:32 -0500 Subject: [PATCH] Update ops.py --- comfy/ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/ops.py b/comfy/ops.py index 70ad4c712..0384c8717 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -534,7 +534,7 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec if dtype != MixedPrecisionOps._compute_dtype: self.comfy_cast_weights = True if self._has_bias: - self.bias = torch.nn.Parameter(torch.empty(out_features, device=device, dtype=dtype)) + self.bias = torch.nn.Parameter(torch.empty(self.out_features, device=device, dtype=dtype)) else: self.register_parameter("bias", None) else: @@ -567,7 +567,7 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec ) if self._has_bias: - self.bias = torch.nn.Parameter(torch.empty(out_features, device=device, dtype=MixedPrecisionOps._compute_dtype)) + self.bias = torch.nn.Parameter(torch.empty(self.out_features, device=device, dtype=MixedPrecisionOps._compute_dtype)) else: self.register_parameter("bias", None)