📝Easy Guide: Installing Triton, Sage Attention, and Teacache for ComfyUI Portable (Windows)
🕑 Added 2025-03-13 15:30:03 +0000 UTC👉🏾Prerequisites
GPU Compatibility:
RTX 40xx (Ada) and RTX 30xx (Ampere): Fully supported.
RTX 50xx (Blackwell): Support is very new and requires the latest software.
RTX 20xx (Turing) and older: Limited compatibility – you may experience issues.
📂Step 1: Check Your ComfyUI Setup
Open your ComfyUI directory.
Check if there’s a folder named python_embeded inside it.

(If you previously installed extensions using Triton, you might already see a libs folder inside python_embeded. If not, don’t worry—we’ll add it later.)
👩🏾💻Step 2: Install Triton
Triton is required for SageAttention to work properly. There are two options here:
1️⃣ Standard Installation:
Open a Command Prompt (Win + R → type cmd → hit Enter).
Navigate to your ComfyUI folder using the command:
cd path\to\ComfyUI_windows_portable
(Replace path\to\ComfyUI_windows_portable with your actual folder location.)
Run the following command to install Triton:
python_embeded\python.exe -m pip install -U triton-windows

Note: If the package “triton-windows” isn’t found on PyPI, download the appropriate wheel—e.g., triton-3.2.0-cp312-cp312-win_amd64.whl—from here, place it in your ComfyUI folder, and install it with:
python_embeded\python.exe -m pip install path\to\triton-3.2.0-cp312-cp312-win_amd64.whl
(Replace path\to\... with the actual file path.)
2️⃣ Pre-release Version (if needed):
If you need the pre-release version (Triton 3.3), use:
python_embeded\python.exe -m pip install -U --pre triton-windows
👨🏾💻Step 3: Install Sage Attention
Run this command in the same Command Prompt window:
python_embeded\python.exe -m pip install -U sageattention
Note: If you see a deprecation warning about loading an egg (e.g., sageattention-2.0.1-py3.12-win-amd64.egg), it’s recommended to first upgrade pip:
python_embeded\python.exe -m pip install --upgrade pip
Then force a reinstall if necessary:
python_embeded\python.exe -m pip install --force-reinstall sageattention
🔍Step 4: Install Teacache
Teacache is an optional but useful caching tool that speeds up processing.
Note: You can now install it via the ComfyUI Manager. Open the Manager, go to the "Custom Nodes Manager", search for “comfyui-teacache”, and install it.

or click "Install via Git URL" with https://github.com/welltop-cn/ComfyUI-TeaCache
📂Step 5: Add Missing libs and include Folders
If Triton doesn’t work right away, you may need to add libs and include manually:
Download the required files:
If you’re using ComfyUI Portable v0.2.4 or later (with Python 3.12.7), get them from here: 👉 Download include & libs folders
If you have a different Python version, check for compatible files:
👉 Alternative versions here
Extract the downloaded ZIP and place the include and libs folders inside:
📁ComfyUI_windows_portable\python_embeded\
🚨 Important: Ensure you place them correctly:
✅ python_embeded\libs (not python_embeded\Lib)
✅ python_embeded\include
🚦Step 6: Verify Installation
Open ComfyUI and try running an Sage Attention workflow: https://www.patreon.com/posts/black-mixtures-2-124117186
If you experience issues, go back and make sure:
Triton installed correctly (triton-windows shows up in pip list)
Your libs and include folders are in the right place.
🔨Troubleshooting
Command Not Found?
Ensure you’re running commands from inside the ComfyUI directory.Sage Attention Not Working?
Reinstall it using:
python_embeded\python.exe -m pip install --force-reinstall sageattention
Triton Compilation Errors?
Make sure you have Visual C++ Redistributable installed:
👉 Download VC RedistRestart your computer and try again.
Still not working?
Send me a DM on Patreon or Discord, or comment below and I'd be happy to help troubleshoot this!
March 24th, 2025 Update - V1.0
We've put together an EXPERIMENTAL sage attention & triton installer which you can download below. (Still working on the additional features)
Place the "BlackMixture-sage-attention-installer.bat" file in your ComfyUI portable root directory.
Click "run anyway" if you receive a pop up from Windows Defender. (There's no viruses in this file. You can verify the code by right-clicking and opening with notepad. As I'm not a programmer, this was written using LLMs based on this text guide article)
I recommend starting with these options (as the others are more experimental):
1: Check system compatibility
3: Install Triton
4: Install Sage Attention
6: Setup include and libs folders
9: Verify installation
Comments
backup account
copy and pasted my comfyui portable on my 4090 machine, installed the stuff successfully via command line and get this error "Can't import SageAttention: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed."
Black Mixture
The version of torch will depend on what's compatible with your GPU
Ben Weinstein
what version of torch is correct for the advanced wan 2.1 workflow ?
mojiiito2
Hello, I've installed comfyui with pinokio but I don't have the python embeded_folder, Generally, python seems to be installed in Pinokio\bin\miniconda\Scripts and comfy is installed there (with all regular folders inside) : Pinokio\api\comfy.git Any suggestion?
