Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Don't crash right away if op is uninitialized. (#12615)

comfyanonymous599f9c50109d
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