Why Use SageAttention and Triton in ComfyUI?
When you enable SageAttention, your image generation becomes dramatically faster. In most cases the time drops by 30–50%, and sometimes even more depending on the model and hardware.
For example, an image that normally takes 115 seconds without SageAttention may take only 45 seconds with it — almost 70% faster. Less time waiting, more time creating.
Introduction
Speeding up image generation in ComfyUI is easy with SageAttention and Triton. These tools can help you cut generation times by over 50%. This guide walks you through every step to set up SageAttention and Triton in ComfyUI on Windows — no prior experience needed.
By the end, you will be generating images significantly faster and your whole workflow will feel noticeably more efficient. Just follow along and you will have everything up and running without any hassle.
ComfyUI_windows_portable root folder. If you are in a different directory, the commands will not work as expected. Open Command Prompt from that folder every time.Step 1: Install Visual C++ Redistributable
Before installing Triton, make sure the Visual C++ Redistributable for Visual Studio 2015–2022 is installed on your system. Triton depends on it and will fail without it.
Download Visual C++ RedistributableStep 2: Remove Old Triton Packages
Open your ComfyUI_windows_portable folder. In the address bar at the top of the window, type cmd and press Enter to open Command Prompt already pointing at that folder.
Uninstall any existing Triton packages to avoid conflicts:
.python_embededpython.exe -m pip uninstall tritonStep 3: Install the Latest Triton for ComfyUI
In the same Command Prompt, install the Windows-compatible Triton package:
.python_embededpython.exe -m pip install -U "triton-windows<3.6"Next, check your Python version — you need it to download the correct Triton zip file:
.python_embededpython.exe --versionDownload the matching Triton zip file for your Python version from the GitHub releases page:
Triton Windows Releases (GitHub)Which zip file to download:
- Python 3.11:
python_3.11.9_include_libs.zip - Python 3.10:
python_3.10.11_include_libs.zip
Unzip the downloaded file. You will find two folders: include and libs. Copy both into your python_embeded folder inside ComfyUI_windows_portable.
Step 4: Update the Torch Package
First, check your current Torch version to see if it needs updating:
.python_embededpython.exe -m pip freezeLook for torch in the output list.
If Torch is outdated, uninstall it first:
.python_embededpython.exe -m pip uninstall torch torchvision torchaudioThen install the latest version of Torch with CUDA 12.8 support:
.python_embededpython.exe -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128Step 5: Install SageAttention for ComfyUI
Visit the SageAttention GitHub releases page and download the .whl file that matches your Torch version and Python version.
Which .whl file to download:
- Torch 2.9:
sageattention-2.2.0+cu128torch2.9.0andhigher.post4-cp39-…-win_amd64.whl - Torch 2.8:
sageattention-2.2.0+cu128torch2.8.0.post3-cp39-abi3-win_amd64.whl
Place the downloaded .whl file in your ComfyUI_windows_portable folder.
Install SageAttention using the command below. Replace your_sageattention_filename.whl with the actual file name you downloaded:
.python_embededpython.exe -m pip install ./your_sageattention_filename.whlStep 6: Start ComfyUI and Test SageAttention
Start your ComfyUI server as usual. Download the example workflow below, drag it into ComfyUI, and run a test generation to verify SageAttention is active.
Generate a test image and compare the time shown in your terminal. You should see a significant reduction compared to your previous generation times.
Frequently Asked Questions
Conclusion
Setting up SageAttention and Triton for ComfyUI on Windows takes a bit of care with matching versions, but the speed payoff is well worth the effort. These steps give you a 30–70% reduction in generation times without any compromise on output quality.
Always pick package versions that match your Python and CUDA setup, and remember to run all commands from the ComfyUI_windows_portable folder. Once it is running, you will notice the difference immediately.
Join the discussion
Sign in to leave a comment or reply
No comments yet
Be the first to share your thoughts!


















