mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-28 13:55:41 +08:00
Fix fp8 model training
This commit is contained in:
parent
eea608e48f
commit
4a976adcd7
13
comfy/ops.py
13
comfy/ops.py
@ -336,12 +336,13 @@ class fp8_ops(manual_cast):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def forward_comfy_cast_weights(self, input):
|
def forward_comfy_cast_weights(self, input):
|
||||||
try:
|
if not self.training:
|
||||||
out = fp8_linear(self, input)
|
try:
|
||||||
if out is not None:
|
out = fp8_linear(self, input)
|
||||||
return out
|
if out is not None:
|
||||||
except Exception as e:
|
return out
|
||||||
logging.info("Exception during fp8 op: {}".format(e))
|
except Exception as e:
|
||||||
|
logging.info("Exception during fp8 op: {}".format(e))
|
||||||
|
|
||||||
weight, bias = cast_bias_weight(self, input)
|
weight, bias = cast_bias_weight(self, input)
|
||||||
return torch.nn.functional.linear(input, weight, bias)
|
return torch.nn.functional.linear(input, weight, bias)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user