Upload AutoInstall Pytorch Triton Sage.bat
Browse files
AutoInstall Pytorch Triton Sage.bat
CHANGED
@@ -24,7 +24,7 @@ for /f "delims=" %%i in ('%PYTHON% -c "import platform; print(platform.python_ve
|
|
24 |
echo [INFO] Python Version: %PYVER%
|
25 |
|
26 |
REM Pip version
|
27 |
-
for /f "delims=" %%i in ('%PYTHON% -m pip --version') do set PIPVER=%%i
|
28 |
echo [INFO] Pip Version: %PIPVER%
|
29 |
|
30 |
REM CPU Cores
|
@@ -53,6 +53,18 @@ echo.
|
|
53 |
set /p "inp=Do you want to update pip and set setuptools to 70.2.0? (y/n): "
|
54 |
if /i "!inp!"=="y" set UPDATE_PIP=true
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
REM Install PyTorch?
|
57 |
set INSTALL_TORCH=false
|
58 |
set TORCH_NIGHTLY=false
|
@@ -81,10 +93,10 @@ if "%torch_choice%"=="1" (
|
|
81 |
REM Install Triton?
|
82 |
set INSTALL_TRITON=false
|
83 |
echo.
|
84 |
-
echo [0] Skip Triton
|
85 |
echo [1] Install Nightly Triton
|
86 |
echo [2] Install Stable Triton
|
87 |
echo [3] Install LeoMaxwell Triton
|
|
|
88 |
set /p "triton_choice=Choose Triton version: "
|
89 |
if not "!triton_choice!"=="0" set INSTALL_TRITON=true
|
90 |
|
@@ -97,28 +109,19 @@ echo [0] Skip SageAttention
|
|
97 |
set /p "sage_choice=Choose SageAttention version: "
|
98 |
if not "!sage_choice!"=="0" set INSTALL_SAGE=true
|
99 |
|
100 |
-
REM Update ComfyUI?
|
101 |
-
set UPDATE_COMFY=false
|
102 |
-
echo.
|
103 |
-
set /p "inp=Do you want to update ComfyUI via Git? (y/n): "
|
104 |
-
if /i "!inp!"=="y" set UPDATE_COMFY=true
|
105 |
-
|
106 |
-
REM Create Launcher?
|
107 |
-
set MAKE_LAUNCHER=false
|
108 |
-
echo.
|
109 |
-
set /p "inp=Do you want to generate a launcher batch file for FP16+Sage? (y/n): "
|
110 |
-
if /i "!inp!"=="y" set MAKE_LAUNCHER=true
|
111 |
-
|
112 |
REM === RUN CHOSEN INSTALLS ===
|
113 |
|
114 |
cd /d "%UPDATE_DIR%"
|
115 |
|
116 |
if "%UPDATE_PIP%"=="true" (
|
117 |
echo [INFO] Updating pip and installing setuptools==70.2.0
|
118 |
-
%PYTHON% -m pip install --upgrade pip setuptools==70.2.0
|
119 |
)
|
120 |
|
121 |
if "%INSTALL_TORCH%"=="true" (
|
|
|
|
|
|
|
122 |
if "%TORCH_NIGHTLY%"=="true" (
|
123 |
if "%TORCH_MANUAL%"=="true" (
|
124 |
echo.
|
@@ -153,44 +156,47 @@ if "%INSTALL_TORCH%"=="true" (
|
|
153 |
echo Torchaudio: !AUDIO_URL!
|
154 |
echo Torchvision:!VISION_URL!
|
155 |
|
156 |
-
%PYTHON% -m pip install "!TORCH_URL!" "!AUDIO_URL!" "!VISION_URL!"
|
157 |
) else (
|
158 |
echo [INFO] Installing PyTorch Nightly for CUDA %CLEAN_CUDA%
|
159 |
-
%PYTHON% -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu%CLEAN_CUDA%
|
160 |
)
|
161 |
) else (
|
162 |
echo [INFO] Installing PyTorch Stable for CUDA %CLEAN_CUDA%
|
163 |
-
%PYTHON% -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu%CLEAN_CUDA%
|
164 |
)
|
165 |
)
|
166 |
|
167 |
if "%INSTALL_TRITON%"=="true" (
|
168 |
echo [INFO] Uninstalling old Triton versions
|
169 |
-
%PYTHON% -m pip uninstall -y triton triton-windows
|
170 |
|
171 |
if "%triton_choice%"=="1" (
|
172 |
echo Installing Triton Nightly
|
173 |
-
%PYTHON% -m pip install -U --pre triton-windows
|
174 |
) else if "%triton_choice%"=="2" (
|
175 |
echo Installing Triton Stable
|
176 |
-
%PYTHON% -m pip install triton-windows
|
177 |
) else if "%triton_choice%"=="3" (
|
178 |
echo Installing LeoMaxwell Triton
|
179 |
-
%PYTHON% -m pip install https://github.com/leomaxwell973/Triton-3.3.0-UPDATE_FROM_3.2.0_and_FIXED-Windows-Nvidia-Prebuilt/releases/download/3.3.0_cu128_Py312/triton-3.3.0-cp312-cp312-win_amd64.whl
|
180 |
)
|
181 |
)
|
182 |
|
183 |
if "%INSTALL_SAGE%"=="true" (
|
|
|
|
|
|
|
184 |
if "%sage_choice%"=="1" (
|
185 |
echo Installing SageAttention v1
|
186 |
-
%PYTHON% -m pip install sageattention==1.0.6
|
187 |
) else (
|
188 |
echo Installing SageAttention v2 from source
|
189 |
cd "%UPDATE_DIR%"
|
190 |
git clone https://github.com/thu-ml/SageAttention
|
191 |
cd SageAttention
|
192 |
set MAX_JOBS=%CPU_CORES%
|
193 |
-
%PYTHON% -m pip install .
|
194 |
|
195 |
cd ..
|
196 |
rmdir /s /q SageAttention
|
|
|
24 |
echo [INFO] Python Version: %PYVER%
|
25 |
|
26 |
REM Pip version
|
27 |
+
for /f "delims=" %%i in ('%PYTHON% -s -m pip --version') do set PIPVER=%%i
|
28 |
echo [INFO] Pip Version: %PIPVER%
|
29 |
|
30 |
REM CPU Cores
|
|
|
53 |
set /p "inp=Do you want to update pip and set setuptools to 70.2.0? (y/n): "
|
54 |
if /i "!inp!"=="y" set UPDATE_PIP=true
|
55 |
|
56 |
+
REM Update ComfyUI?
|
57 |
+
set UPDATE_COMFY=false
|
58 |
+
echo.
|
59 |
+
set /p "inp=Do you want to update ComfyUI via Git? (y/n): "
|
60 |
+
if /i "!inp!"=="y" set UPDATE_COMFY=true
|
61 |
+
|
62 |
+
REM Create Launcher?
|
63 |
+
set MAKE_LAUNCHER=false
|
64 |
+
echo.
|
65 |
+
set /p "inp=Do you want to generate a launcher batch file for FP16+Sage? (y/n): "
|
66 |
+
if /i "!inp!"=="y" set MAKE_LAUNCHER=true
|
67 |
+
|
68 |
REM Install PyTorch?
|
69 |
set INSTALL_TORCH=false
|
70 |
set TORCH_NIGHTLY=false
|
|
|
93 |
REM Install Triton?
|
94 |
set INSTALL_TRITON=false
|
95 |
echo.
|
|
|
96 |
echo [1] Install Nightly Triton
|
97 |
echo [2] Install Stable Triton
|
98 |
echo [3] Install LeoMaxwell Triton
|
99 |
+
echo [0] Skip Triton
|
100 |
set /p "triton_choice=Choose Triton version: "
|
101 |
if not "!triton_choice!"=="0" set INSTALL_TRITON=true
|
102 |
|
|
|
109 |
set /p "sage_choice=Choose SageAttention version: "
|
110 |
if not "!sage_choice!"=="0" set INSTALL_SAGE=true
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
REM === RUN CHOSEN INSTALLS ===
|
113 |
|
114 |
cd /d "%UPDATE_DIR%"
|
115 |
|
116 |
if "%UPDATE_PIP%"=="true" (
|
117 |
echo [INFO] Updating pip and installing setuptools==70.2.0
|
118 |
+
%PYTHON% -s -m pip install --upgrade pip setuptools==70.2.0
|
119 |
)
|
120 |
|
121 |
if "%INSTALL_TORCH%"=="true" (
|
122 |
+
echo [INFO] Uninstalling old Torch versions
|
123 |
+
%PYTHON% -s -m pip uninstall -y torch torchvision torchaudio
|
124 |
+
|
125 |
if "%TORCH_NIGHTLY%"=="true" (
|
126 |
if "%TORCH_MANUAL%"=="true" (
|
127 |
echo.
|
|
|
156 |
echo Torchaudio: !AUDIO_URL!
|
157 |
echo Torchvision:!VISION_URL!
|
158 |
|
159 |
+
%PYTHON% -s -m pip install "!TORCH_URL!" "!AUDIO_URL!" "!VISION_URL!"
|
160 |
) else (
|
161 |
echo [INFO] Installing PyTorch Nightly for CUDA %CLEAN_CUDA%
|
162 |
+
%PYTHON% -s -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu%CLEAN_CUDA%
|
163 |
)
|
164 |
) else (
|
165 |
echo [INFO] Installing PyTorch Stable for CUDA %CLEAN_CUDA%
|
166 |
+
%PYTHON% -s -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu%CLEAN_CUDA%
|
167 |
)
|
168 |
)
|
169 |
|
170 |
if "%INSTALL_TRITON%"=="true" (
|
171 |
echo [INFO] Uninstalling old Triton versions
|
172 |
+
%PYTHON% -s -m pip uninstall -y triton triton-windows
|
173 |
|
174 |
if "%triton_choice%"=="1" (
|
175 |
echo Installing Triton Nightly
|
176 |
+
%PYTHON% -s -m pip install -U --pre triton-windows
|
177 |
) else if "%triton_choice%"=="2" (
|
178 |
echo Installing Triton Stable
|
179 |
+
%PYTHON% -s -m pip install triton-windows
|
180 |
) else if "%triton_choice%"=="3" (
|
181 |
echo Installing LeoMaxwell Triton
|
182 |
+
%PYTHON% -s -m pip install https://github.com/leomaxwell973/Triton-3.3.0-UPDATE_FROM_3.2.0_and_FIXED-Windows-Nvidia-Prebuilt/releases/download/3.3.0_cu128_Py312/triton-3.3.0-cp312-cp312-win_amd64.whl
|
183 |
)
|
184 |
)
|
185 |
|
186 |
if "%INSTALL_SAGE%"=="true" (
|
187 |
+
echo [INFO] Uninstalling old SageAttention versions
|
188 |
+
%PYTHON% -s -m pip uninstall -y sageattention
|
189 |
+
|
190 |
if "%sage_choice%"=="1" (
|
191 |
echo Installing SageAttention v1
|
192 |
+
%PYTHON% -s -m pip install sageattention==1.0.6
|
193 |
) else (
|
194 |
echo Installing SageAttention v2 from source
|
195 |
cd "%UPDATE_DIR%"
|
196 |
git clone https://github.com/thu-ml/SageAttention
|
197 |
cd SageAttention
|
198 |
set MAX_JOBS=%CPU_CORES%
|
199 |
+
%PYTHON% -s -m pip install .
|
200 |
|
201 |
cd ..
|
202 |
rmdir /s /q SageAttention
|