disable xformers/sdp if cannot be used

This commit is contained in:
Vladimir Mandic
2023-04-21 11:32:19 -04:00
parent cf80857b4e
commit 57204b3d70
7 changed files with 29 additions and 26 deletions
-3
View File
@@ -1,4 +1,3 @@
import sys
import html
import threading
import time
@@ -52,8 +51,6 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False):
if run_memmon:
shared.mem_mon.monitor()
t = time.perf_counter()
if sys.modules['xformers'] is not None and shared.opts.cross_attention_optimization != "xFormers":
sys.modules["xformers"] = None
try:
if shared.cmd_opts.profile:
pr = cProfile.Profile()