mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-10 03:37:33 +08:00
Don't crash right away if op is uninitialized. (#12615)
This commit is contained in:
parent
11fefa58e9
commit
599f9c5010
@ -827,6 +827,10 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec
|
|||||||
else:
|
else:
|
||||||
sd = {}
|
sd = {}
|
||||||
|
|
||||||
|
if not hasattr(self, 'weight'):
|
||||||
|
logging.warning("Warning: state dict on uninitialized op {}".format(prefix))
|
||||||
|
return sd
|
||||||
|
|
||||||
if self.bias is not None:
|
if self.bias is not None:
|
||||||
sd["{}bias".format(prefix)] = self.bias
|
sd["{}bias".format(prefix)] = self.bias
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user