UmeAiRT commited on
Commit
6b6949c
·
verified ·
1 Parent(s): 9574c6c

Upload Install-ComfyUI.ps1

Browse files
Files changed (1) hide show
  1. scripts/ComfyUI/Install-ComfyUI.ps1 +38 -2
scripts/ComfyUI/Install-ComfyUI.ps1 CHANGED
@@ -264,9 +264,45 @@ foreach ($node in $customNodes) {
264
  }
265
 
266
  # --- Étape 6: Installation des modules Python supplémentaires ---
267
- Write-Log "`nStep 6: Installing supplementary Python modules..." -Color Yellow
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  Invoke-AndLog "$venvPython" "-m pip install -U xformers --index-url https://download.pytorch.org/whl/cu128"
269
- # ... (Ajoutez ici l'installation de Triton, SageAttention etc. si nécessaire, en utilisant $venvPython) ...
 
 
 
 
 
 
 
270
 
271
  # --- Étape 7: Téléchargement des Workflows et Settings ---
272
  Write-Log "`nStep 7: Downloading Workflows & Settings..." -Color Yellow
 
264
  }
265
 
266
  # --- Étape 6: Installation des modules Python supplémentaires ---
267
+ Write-Log "`nStep 6: Installing supplementary modules..." -Color Yellow
268
+
269
+ # VS Build Tools
270
+ Write-Log " - Installing Visual Studio Build Tools (may be required for some packages)..."
271
+ $wingetArgs = "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"
272
+ Invoke-AndLog "winget" $wingetArgs
273
+
274
+ # Python include/libs
275
+ Write-Log " - Installing Python include/libs for compatibility..."
276
+ $pyLibsUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/python_3.12.9_include_libs.zip"
277
+ $zipPath = Join-Path $InstallPath "python_libs.tmp.zip"
278
+ $extractPath = Join-Path $comfyPath "venv" # On extrait dans le venv
279
+ Download-File -Uri $pyLibsUrl -OutFile $zipPath
280
+ if (Test-Path $zipPath) {
281
+ try {
282
+ Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
283
+ Write-Log " - Python libs extracted successfully." -Color Green
284
+ } catch { Write-Log " - FAILED to extract python libs. Error: $($_.Exception.Message)" -Color Red } finally { Remove-Item -Path $zipPath -Force }
285
+ }
286
+
287
+ # Triton
288
+ Write-Log " - Installing Triton..."
289
+ $tritonWheel = Join-Path $InstallPath "triton.whl"
290
+ Download-File -Uri "https://github.com/woct0rdho/triton-windows/releases/download/empty/triton-3.3.0-py3-none-any.whl" -OutFile $tritonWheel
291
+ Invoke-AndLog "$venvPython" "-m pip install `"$tritonWheel`""
292
+ Invoke-AndLog "$venvPython" "-m pip install triton-windows"
293
+ Remove-Item $tritonWheel -ErrorAction SilentlyContinue
294
+
295
+ # xformers
296
+ Write-Log " - Installing xformers..."
297
  Invoke-AndLog "$venvPython" "-m pip install -U xformers --index-url https://download.pytorch.org/whl/cu128"
298
+ # La logique de renommage xformers n'est généralement plus nécessaire avec les installations pip modernes, mais peut être rajoutée ici si besoin.
299
+
300
+ # SageAttention
301
+ Write-Log " - Installing SageAttention..."
302
+ $sageWheel = Join-Path $InstallPath "sageattention.whl"
303
+ Download-File -Uri "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/whl/sageattention-2.1.1+cu128torch2.7.0-cp312-cp312-win_amd64.whl?download=true" -OutFile $sageWheel
304
+ Invoke-AndLog "$venvPython" "-m pip install `"$sageWheel`""
305
+ Remove-Item $sageWheel -ErrorAction SilentlyContinue
306
 
307
  # --- Étape 7: Téléchargement des Workflows et Settings ---
308
  Write-Log "`nStep 7: Downloading Workflows & Settings..." -Color Yellow