mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-06 23:32:30 +08:00
Update.
This commit is contained in:
parent
d4e5c07ebb
commit
4ee951a357
@ -928,6 +928,7 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec
|
|||||||
weight = state_dict.pop(weight_key, None)
|
weight = state_dict.pop(weight_key, None)
|
||||||
if weight is None:
|
if weight is None:
|
||||||
logging.warning(f"Missing weight for layer {layer_name}")
|
logging.warning(f"Missing weight for layer {layer_name}")
|
||||||
|
self.weight = None
|
||||||
return
|
return
|
||||||
|
|
||||||
manually_loaded_keys = [weight_key]
|
manually_loaded_keys = [weight_key]
|
||||||
@ -1034,6 +1035,9 @@ def mixed_precision_ops(quant_config={}, compute_dtype=torch.bfloat16, full_prec
|
|||||||
if self.bias is not None:
|
if self.bias is not None:
|
||||||
sd["{}bias".format(prefix)] = self.bias
|
sd["{}bias".format(prefix)] = self.bias
|
||||||
|
|
||||||
|
if self.weight is None:
|
||||||
|
return sd
|
||||||
|
|
||||||
if isinstance(self.weight, QuantizedTensor):
|
if isinstance(self.weight, QuantizedTensor):
|
||||||
sd_out = self.weight.state_dict("{}weight".format(prefix))
|
sd_out = self.weight.state_dict("{}weight".format(prefix))
|
||||||
for k in sd_out:
|
for k in sd_out:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user