Sign In

(有中文)How to install Sage Attention in new ComfyUI Desktop (2026)

1

The previous tutorial covered how to install Triton, which is a required prerequisite. If you haven't installed Triton yet, please refer to the link below to install it first before moving on to this guide.

上一篇教學分享了如何安裝Triton, 是必要的前置, 如果還沒安裝Triton, 可以參考下方的連結先行安裝, 再接著看這篇.

https://civitai.red/articles/33944/how-to-install-trition-in-new-comfyui-desktop-2026

And the link below is how to install Flash attention, click it if you need it.

還有這篇是如何安裝Flash attention, 有需要可以按以下連結

https://civitai.red/articles/33950/how-to-install-flash-attention-in-new-comfyui-desktop-2026

In that previous tutorial, we learned how to find several key pieces of information in ComfyUI:

在上一篇教學中我們知道如何在ComfyUi中找尋幾項重要資訊:

image.png

You need to note down three key pieces of information:

  • Python Version = 3.13.12 (This is my current version; yours might be different)

  • PyTorch Version = 2.10.0

  • CUDA Version = CU130

你需要知道的是3個資訊:

  1. Python Version = 3.1312 (這是我目前的Version, 你或許跟我不一樣)

  2. Pytouch Version = 2.10.0

  3. Cuda Version = CU130

At this point, you will need to Google and find the corresponding .whl file for SageAttention. You can start by checking the link below to see if there is a suitable file.

這時候, 你需要google 找出Sage Attention相應的whl

你可以先到下方連結看看有否合適的檔案

https://huggingface.co/Wildminder/AI-windows-whl/tree/main

image.png

My environment is Python 3.13 + PyTorch 2.10 + CU130 on Windows OS, so I chose this one.

我的環境是Python3.13 + Pytouch2.10 + CU130, Win OS, 所以我選這個

image.png

Place this file into your ComfyUI installation folder; I placed mine in E:\ComfyUI.

把這檔案放到你ComfyUI安裝的FOLDER, 我放在E:\ComfyUI

image.png

Then, launch ComfyUI. On the startup screen, click the three-dots icon in the top right corner of your local ComfyUI to enter the management page.

然後開啟ComfyUI, 在啟動畫面按本地ComfyUI右上角的三點, 進入管理頁面

image.pngimage.png

In the management interface, find the Terminal.

在管理介面找到Terminal

image.png

Next, navigate into the Scripts folder inside .venv, and type: pip install sageattention-2.2.0-cp313-cp313-win_amd64.whl

然後進入 .venv 中的Scripts 再輸入: pip install sageattention-2.2.0-cp313-cp313-win_amd64.whl

image.png

It usually takes just a few seconds to complete the installation, and then you can use it after restarting ComfyUI.

You can go to the Nodes Manager and choose to install the 'KJNodes' node pack. One of the nodes in this pack is designed to work with SageAttention.

Connect the 'Patch Sage Attention KJ' node right after the 'Load Diffusion Model' node, and leave the option set to 'Auto'. This will allow you to get the SageAttention boost during generation.

一般幾秒就安裝完成, 然後重新啟動ComfyUI就能用了

你可以在Nodes Manager選擇安裝 KJNode這個Node Pack

其中有一個Node是配合Sage Attention

把Patch Sage Attention KJ接在 Load Diffusion Model後方, 選項用Auto就可以了, 這樣就可以在Generate 中得到Sage Attention的加成

image.pngimage.png

1