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