| @ECHO OFF | |
| CALL environment.bat passive | |
| ECHO # FlashAttention2 install script | |
| ECHO. | |
| ECHO This will install Triton and FlashAttention 2.8.3 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\flash_attn-2.8.3+cu128torch2.8.0cxx11abiFALSE-cp312-cp312-win_amd64.whl | |
| ECHO. | |
| ECHO Installation complete ... | |
| ECHO. | |
| pause |