Fix --use-flash-attention ignored when xformers installed. (#14083)

This commit is contained in:
comfyanonymous 2026-05-23 17:44:28 -07:00 committed by GitHub
parent 0af123022d
commit 08d809d128
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -741,12 +741,12 @@ optimized_attention = attention_basic
if model_management.sage_attention_enabled():
logging.info("Using sage attention")
optimized_attention = attention_sage
elif model_management.xformers_enabled():
logging.info("Using xformers attention")
optimized_attention = attention_xformers
elif model_management.flash_attention_enabled():
logging.info("Using Flash Attention")
optimized_attention = attention_flash
elif model_management.xformers_enabled():
logging.info("Using xformers attention")
optimized_attention = attention_xformers
elif model_management.pytorch_attention_enabled():
logging.info("Using pytorch attention")
optimized_attention = attention_pytorch