mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-16 20:36:59 +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
|
||||
|
||||
def forward_comfy_cast_weights(self, input):
|
||||
out = fp8_linear(self, input)
|
||||
if out is not None:
|
||||
return out
|
||||
try:
|
||||
out = fp8_linear(self, input)
|
||||
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)
|
||||
return torch.nn.functional.linear(input, weight, bias)
|
||||
|
Loading…
x
Reference in New Issue
Block a user