From 599f9c50109d3c6fbb2791de1810ecf84601affa Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Tue, 24 Feb 2026 09:28:25 -0800 Subject: [PATCH] Don't crash right away if op is uninitialized. (#12615) --- comfy/ops.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comfy/ops.py b/comfy/ops.py index a6c642795..34f72ff17 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -827,6 +827,10 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec else: sd = {} + if not hasattr(self, 'weight'): + logging.warning("Warning: state dict on uninitialized op {}".format(prefix)) + return sd + if self.bias is not None: sd["{}bias".format(prefix)] = self.bias