As of now, Sage Attention 2 (a high-performance attention method for SD-based models) requires specific support in the backend pipeline to function properly within ComfyUI. The key component that often brings this compatibility is:
✅ KJNodes (by KJ12112)
This node pack includes custom nodes and functionality that enable Sage Attention 2 (as well as other advanced attention algorithms like Flash Attention), typically by integrating directly with the xformers or optimized CUDA kernels where applicable.
🚫 Will Sage Attention 2 work without KJNodes?
Short answer:
No, not natively — unless another node pack or custom modification implements Sage Attention 2 support separately.
Longer answer:
ComfyUI by itself does not include Sage Attention 2 functionality in the base install. If you're running just the default ComfyUI without any extra nodes, you won't have access to Sage Attention 2.
✅ Alternatives / Solutions:
- Install KJNodes, which is the easiest and primary way to use Sage Attention 2 in ComfyUI.
- Keep an eye on other custom node packs that may support advanced attention mechanisms.
- Ensure that your hardware supports the necessary acceleration (e.g., CUDA 11+, modern NVIDIA GPU), as Sage Attention 2 is a high-performance feature.
📦 How to install KJNodes for Sage Attention 2:
-
Clone the repo into your custom_nodes/ directory:
git clone https://github.com/KJ12112/ComfyUI_KJNodes.git custom_nodes/KJNodes
-
Restart ComfyUI.
-
Look for attention options in settings or specific nodes related to sampling where Sage Attention 2 can be enabled.
✅ Summary:
| Feature | Available without KJNodes? |
|---|
| Sage Attention 2 support | ❌ No |
| Needs KJNodes or similar? | ✅ Yes |
Let me know if you'd like help installing KJNodes or verifying if it's working!