Install Triton and Sage Attention on Windows with RTX 50XX
Workflow
Wan Video
Workflow
Wan Video
v2.1

Install Triton and Sage Attention on Windows with RTX 50XX

⭐ 0.0
⬇ 395 Downloads
👁 1 Views
🖼 1 Images

About this model

Hey everyone! I’ve successfully set up Triton and Sage Attention on my RTX 5070Ti with Windows 11 to speed up Wan2.1 generation. This guide is for anyone who doesn’t want to mess with WSL or install Linux. Here are the steps, with references for more details:

Download the special ComfyUI version for 50XX series GPUs, extract it, and run the run_nvidia_gpu.bat batch file. Wait until all dependencies are installed. Install MSVC and Windows SDK

  • Steps:

    • Install Visual Studio 2022 from Visual Studio Downloads. Select “Desktop development with C++”.

    • Add to PATH:

      • Locate cl.exe (e.g., C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64).

      • Add to PATH:

        cmd

        set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64

      • Or set permanently via System > Advanced > Environment Variables > Edit “Path”.

    • Test:

      • OpenPowerShell and enter cl

      • Expected: Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34808 for x64....

3. Install vcredist

  • Steps:

    • Download Visual C++ Redistributable (2015-2022) from Microsoft.

    • Run vc_redist.x64.exe and install.

4. Install Triton

  • Steps:

    • Install a pre-release wheel for Windows:

      cmd

      cd ComfyUI_cu128_50XX\python_embeded python.exe -m pip install Install Python 3.12.8 and Configure ComfyUI Embedded Python

      • Why: ComfyUI’s embedded Python needs headers and libs for Triton/Sage Attention.

      • Steps:

        • Download Python 3.12.8 from Python.org (Windows installer).

        • Install to a temporary path (e.g., C:\Python312).

        • Copy include and libs to ComfyUI’s embedded Python:

          cmd

          xcopy C:\Python312\include C:\Data\ComfyUI_cu128_50XX\python_embeded\include

          xcopy C:\Python312\libs C:\Data\ComfyUI_cu128_50XX\python_embeded\libs

      6. Install Sage Attention 1.0.6

      • Steps:

        • Download Sage Attention 1.0.6 it to the Comfy UI folder and replace setup.py with the attached file

        • Install using embedded Python:

          cmd

          cd C:\Temp\sageattention-1.0.6 \ComfyUI_cu128_50XX\python_embeded\python.exe setup.py install

      Before and After Results

      • Test Setup: 512x512 i2v video with 30 steps, 41 frames, 20 block swaps and UniPC sampler using I2V 720p 8fp model from master Kijai Attention: ~27s/it.

      • Sage Attention: ~14s/it.

      • Sage Attention+TeaCache: ~8s/it

Related Models

Similar AI models you may like