ComfyUI_portable_python312 / runscripts /install_sageattn2.bat
Xeno443's picture
Upload 11 files
9758e85 verified
@ECHO OFF
CALL environment.bat passive
ECHO # SageAttention2 install script
ECHO.
ECHO This will install Triton and SageAttention 2.2.0 into the Python environment.
ECHO An Internet connection is required to download the necessary components.
PAUSE
set PYTHONUTF8=1
set PYTHONIOENCODING=utf-8
set PYTHON=python_embeded\python.exe
ECHO.
ECHO ### Installing Visual Studio Build Tools.
ECHO If you already have a compatible version, the update will read "Installer failed with exit code: 1". This is normal!
ECHO ====================================================================================================================
winget install --id Microsoft.VisualStudio.2022.BuildTools -e --source winget --override "--quiet --wait --norestart --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.20348"
ECHO.
ECHO ### Installing Triton
ECHO =====================
%PYTHON% -s -m pip install triton-windows
ECHO.
ECHO ### Installing SageAttention
ECHO ============================
%PYTHON% -s -m pip install .\attnfiles\sageattention-2.2.0+cu128torch2.9.0.post3-cp39-abi3-win_amd64.whl
ECHO Runnning test script ...
ECHO.
%PYTHON% .\attnfiles\test_sageattn.py
ECHO.
ECHO Installation complete ...
ECHO.
pause