mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-22 15:37:18 +08:00
Fallback to regular op when fp8 op throws exception. (#8761)
This commit is contained in:
parent
79ed752748
commit
111f583e00
@ -336,9 +336,12 @@ class fp8_ops(manual_cast):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def forward_comfy_cast_weights(self, input):
|
def forward_comfy_cast_weights(self, input):
|
||||||
out = fp8_linear(self, input)
|
try:
|
||||||
if out is not None:
|
out = fp8_linear(self, input)
|
||||||
return out
|
if out is not None:
|
||||||
|
return out
|
||||||
|
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