Sign In

How to: Run your 50XX GPU with Triton and Sage Attention

44

How to: Run your 50XX GPU with Triton and Sage Attention

How to run a 50xx with Triton and Sage Attention in ComfyUI on Windows11

If you think you have a correct Python 3.13.2 Install with all the mandatory steps I mentioned in the Install Python 3.13.2 section, a NVIDIA CUDA12.8 Toolkit install, the latest NVIDIA driver and the correct Visual Studio Install you may skip the first 4 steps and start with step 5.


1. If you have any Python Version installed on your System you want to delete all instances of Python first.

  • Remove your local Python installs via Programs

  • Remove Python from all your path

  • Delete the remaining files in (C:\Users\Username\AppData\Local\Programs\Python and delete any files/folders in there) alternatively in C:\PythonXX or C:\Program Files\PythonXX.
    XX stands for the version number.

  • Restart your machine


2. Install Python 3.13.2

  • Download the Python Windows Installer (64-bit) version: https://www.python.org/downloads/release/python-3132/

  • Right Click the File from inside the folder you downloaded it to.
    IMPORTANT STEP: open the installer as Administrator

  • Inside the Python 3.13.2 (64-bit) Setup you need to tick both boxes
    Use admin privileges when installing py.exe & Add python.exe to PATH

  • Then click on Customize installation
    Check everything with the blue markers Documentation, pip, tcl/tk and IDLE, Python test suite and MOST IMPORTANT check py launcher and for all users (requires admin privileges).

  • Click Next

  • In the Advanced Options:
    Check Install Python 3.13 for all users, so the 1st 5 boxes are ticked with blue marks.
    Your install location now should read: C:\Program Files\Python313

  • Click Install

  • Once installed, restart your machine


3. Ā NVIDIA Toolkit Install:

  • Have cuda_12.8.0_571.96_windows installed plus the latest NVIDIA Game Ready Driver. I am using the latest Windows11 GeForce Game Ready Driver which was released as Version: 572.83 on March 18th, 2025. If both is already installed on your machine. You are good to go. Proceed with step 4.

  • If NOT, delete your old NVIDIA Toolkit.

  • If your driver is outdated. Install [Guru3D]-DDU and run it in ā€˜safe mode – minimal’ to delete your entire old driver installs.
    Let it run and reboot your system and install the new driver as a FRESH install.

  • You can download the Toolkit here:
    https://developer.nvidia.com/cuda-downloads

  • You can download the latest drivers here:
    https://www.nvidia.com/en-us/drivers/

  • Once these 2 steps are done, restart your machine


4. Visual Studio Setup

  • Install Visual Studio on your machine

  • Maybe a bit too much but just to make sure to install everything inside
    DESKTOP Development with C++, that means also all the optional things.

  • IF you already have an existing Visual Studio install and want to check if things are set up correctly.
    Click on your windows icon and write ā€œVisual Stuā€ that should be enough to get the Visual Studio Installer up and visible on the search bar. Click on the Installer.
    When opened up it should read: Visual Studio Build Tools 2022. From here you will need to select Change on the right to add the missing installations. Install it and wait. Might take some time.

  • Once done, restart your machine


Ā By now

  • We should have a new CLEAN Python 3.13.2 install on C:\Program Files\Python313

  • A NVIDIA CUDA 12.8 Toolkit install + your GPU runs on the freshly installed latest driver

  • All necessary Desktop Development with C++ Tools from Visual Studio


5. Download and install ComfyUI here:

  • It is a standalone portable Version to make sure your 50 Series card is running.

  • https://github.com/comfyanonymous/ComfyUI/discussions/6643

  • Download the standalone package with nightly pytorch 2.7 cu128

  • Make a Comfy Folder in C:\ or your preferred Comfy install location. Unzip the file inside the newly created folder.

  • On my system it looks like D:\Comfy and inside there, these following folders should be present:
    ComfyUI folder, python_embeded folder, update folder, readme.txt and 4 bat files.

  • If you have the folder structure like that proceed with restarting your machine.


Ā 6. Installing everything inside the ComfyUI’s python_embeded folder:

  • Navigate inside the python_embeded folder and open your cmd inside there

  • Run all these 9 installs separate and in this order:
    Ā 

python.exe -m pip install --force-reinstall --pre torch torchvision torchaudio --index-urlĀ https://download.pytorch.org/whl/nightly/cu128


python.exe -m pip install bitsandbytes

Ā 

python.exe -s -m pip install "accelerate >= 1.4.0"

Ā 

python.exe -s -m pip install "diffusers >= 0.32.2"

Ā 

python.exe -s -m pip install "transformers >= 4.49.0"

Ā 

python.exe -s -m pip install ninja

Ā 

python.exe -s -m pip install wheel

Ā 

python.exe -s -m pip install packaging

Ā 

python.exe -s -m pip install onnxruntime-gpu

Ā 

  • Navigate to your custom_nodes folder (ComfyUI\custom_nodes), inside the custom_nodes folder open your cmd inside there and run:

Ā 

git clone https://github.com/ltdrdata/ComfyUI-Manager comfyui-manager


Ā 7. Copy Python 13.3 ā€˜libs’ and ā€˜include’ folders into your python_embeded.

  • Navigate to your local Python 13.3.2 folder in C:\Program Files\Python313.

  • Copy the libs (NOT LIB) and include folder and paste them into your python_embeded folder.


Ā 8. Installing Triton and Sage Attention

  • Inside your Comfy Install nagivate to your python_embeded folder and run the cmd inside there and run these separate after each other in that order:

    python.exe -m pip install -U --pre triton-windows

    git cloneĀ https://github.com/thu-ml/SageAttention

    python.exe -m pip install sageattention

  • Add --use-sage-attention inside your .bat file in your Comfy folder.

  • Run the bat.


Congratulations! You made it!

You can now run your 50XX NVIDIA Card with sage attention.

I hope I could help you with this written tutorial.
If you have more questions feel free to reach out.


Much love as always!
ChronoKnight

44

Comments