Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Disable xformers when it can't load properly.

comfyanonymous7339479b10a6
diff --git a/comfy/model_management.py b/comfy/model_management.py
index 799e52ba2..be4301aa4 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -133,6 +133,10 @@ else:
import xformers
import xformers.ops
XFORMERS_IS_AVAILABLE = True
+ try:
+ XFORMERS_IS_AVAILABLE = xformers._has_cpp_library
+ except:
+ pass
try:
XFORMERS_VERSION = xformers.version.__version__
print("xformers version:", XFORMERS_VERSION)