better support for xformers flash attention on older versions of torch

This commit is contained in:
AUTOMATIC
2023-01-23 16:40:20 +03:00
parent 3fa482076a
commit 59146621e2
2 changed files with 30 additions and 24 deletions

View File

@@ -24,6 +24,18 @@ See https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable
""")
already_displayed = {}
def display_once(e: Exception, task):
if task in already_displayed:
return
display(e, task)
already_displayed[task] = 1
def run(code, task):
try:
code()