File size: 1,233 Bytes
9758e85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@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