The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Better error if sageattention is installed but a dependency is missing. (#8264)
comfyanonymous5a87757ef96f
diff --git a/comfy/ldm/modules/attention.py b/comfy/ldm/modules/attention.pyindex 45f9e311e..2cb77d85d 100644--- a/comfy/ldm/modules/attention.py+++ b/comfy/ldm/modules/attention.py@@ -20,8 +20,11 @@ if model_management.xformers_enabled():if model_management.sage_attention_enabled():try:from sageattention import sageattn- except ModuleNotFoundError:- logging.error(f"\n\nTo use the `--use-sage-attention` feature, the `sageattention` package must be installed first.\ncommand:\n\t{sys.executable} -m pip install sageattention")+ except ModuleNotFoundError as e:+ if e.name == "sageattention":+ logging.error(f"\n\nTo use the `--use-sage-attention` feature, the `sageattention` package must be installed first.\ncommand:\n\t{sys.executable} -m pip install sageattention")+ else:+ raise eexit(-1)if model_management.flash_attention_enabled():