Installing and Enabling Sage Attention & Triton
This guide walks you through the complete process of both installing and enabling Sage Attention and Triton for ComfyUI. Following these steps will install the necessary components via a script and then configure your startup file to activate them for a significant performance boost.
Download
Sage Attention & Triton Installer Script
This script automates the installation of Sage Attention & Triton for your ComfyUI environment. Administrator rights are required.
How to Use
- Download and Place the Script: Download the installer script from the link above. Place the
.cmdfile directly inside your mainComfyUI_windows_portablefolder. This is the same folder that contains theComfyUI,python_embeded, andupdatesub-folders. - Run the Installer: Right-click the downloaded script and select "Run as administrator". A command window will open and begin the installation process for Triton.
- Modify the Startup Script: Navigate to the
run_nvidia_gpu.batfile. Right-click on it, select "Show more options" (on Windows 11), and then click "Edit". A notepad window will open. - Add Startup Arguments to Enable: At the end of the line that starts with
.\python_embeded\python.exe..., add the arguments--fast --use-sage-attention. The final two lines of your file should look exactly like this:.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast --use-sage-attention pause - Ready to Go: Save and close the notepad file. You can now run
run_nvidia_gpu.batnormally. ComfyUI will launch with Sage Attention and Triton enabled.