Update _utils.py
This commit is contained in:
parent
0569186f14
commit
a6fcbbe814
1 changed files with 5 additions and 1 deletions
|
|
@ -683,8 +683,12 @@ try:
|
|||
pass
|
||||
import xformers.ops.fmha as xformers
|
||||
xformers_attention = xformers.memory_efficient_attention
|
||||
except ModuleNotFoundError:
|
||||
xformers = None
|
||||
xformers_attention = None
|
||||
xformers_version = None
|
||||
except Exception as e:
|
||||
print("========\nSwitching to SDPA PyTorch native attention which is slightly slower.\n========\n")
|
||||
print("========\nSwitching to PyTorch attention since your Xformers is broken.\n========\n")
|
||||
print(str(e))
|
||||
xformers = None
|
||||
xformers_attention = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue