--disable-xformers should not even try to import xformers.

This commit is contained in:
comfyanonymous
2023-03-13 11:36:48 -04:00
parent ebfa749b7b
commit a256a2abde
4 changed files with 15 additions and 16 deletions

View File

@@ -31,15 +31,16 @@ try:
except:
pass
try:
import xformers
import xformers.ops
XFORMERS_IS_AVAILBLE = True
except:
XFORMERS_IS_AVAILBLE = False
if "--disable-xformers" in sys.argv:
XFORMERS_IS_AVAILBLE = False
else:
try:
import xformers
import xformers.ops
XFORMERS_IS_AVAILBLE = True
except:
XFORMERS_IS_AVAILBLE = False
if "--cpu" in sys.argv:
vram_state = CPU