--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

@@ -9,11 +9,9 @@ from typing import Optional, Any
from ldm.modules.attention import MemoryEfficientCrossAttention
import model_management
try:
if model_management.xformers_enabled():
import xformers
import xformers.ops
except:
pass
try:
OOM_EXCEPTION = torch.cuda.OutOfMemoryError