Using in ComfyUI
Hello!
I am trying to install SageAttention3 on Windows in a ComfyUI environment.
My setup: Python 3.13 (embedded), PyTorch 2.8.0 with CUDA 12.8, RTX 5090 GPU.
What I already tried:
Rebuilt the embedded Python by copying the missing include headers (to fix the Python.h and patchlevel.h errors).
Activated Visual Studio 2022 Developer Command Prompt and ran setup.py build_ext --inplace.
Tried different install methods: python setup.py install, pip install -e ., and running through Anaconda.
Also attempted to place the repository directly into site-packages and rebuild from there.
Results:
The build passes the initial stages but fails in sageattn/blackwell/kernel_traits.h with errors about undefined types LayoutSF and SfAtom.
Compilation stops with ninja: build stopped: subcommand failed.
Sometimes I also get warnings about DISTUTILS_USE_SDK and MSVC environment setup.
My main questions are:
Is Windows (CUDA 12.8 + Torch 2.8) officially supported, or is the project intended only for Linux builds?
Could the LayoutSF and SfAtom errors mean I am missing specific dependencies (cutlass version, compiler flags, etc.)?
Would you recommend waiting for a prebuilt wheel, or is there a known workaround for Windows?
Thank you very much for your work and for any guidance you can provide!
Environment details
OS: Windows 11 x64
GPU: RTX 5090
Python: 3.13 (embedded)
Torch: 2.8.0+cu128
CUDA Toolkit: 12.8
Visual Studio 2022 (MSVC 14.44)
Ninja installed
Logs: (I can provide the full build output if needed, including the kernel_traits.h error trace)
share this next time so good samaritans can understand the build environment explicitly:
conda env export > 'envNAME.yaml' or in a windows pwer shell w/o conda:
venv_name\Scripts\Activate.ps1 && pip freeze > requirements.txt