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

  1. Download and Place the Script:Download the installer script from the link above. Place the .cmd file directly inside your main ComfyUI_windows_portable folder. This is the same folder that contains the ComfyUI, python_embeded, and update sub-folders.
  2. 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.
  3. Modify the Startup Script:Navigate to the run_nvidia_gpu.bat file. Right-click on it, select "Show more options" (on Windows 11), and then click "Edit". A notepad window will open.
  4. 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
  5. Ready to Go:Save and close the notepad file. You can now run run_nvidia_gpu.bat normally. ComfyUI will launch with Sage Attention and Triton enabled.