UmeAiRT commited on
Commit
c88b68b
·
verified ·
1 Parent(s): a405e9a

Upload Install-ComfyUI.ps1

Browse files
Files changed (1) hide show
  1. scripts/ComfyUI/Install-ComfyUI.ps1 +21 -1
scripts/ComfyUI/Install-ComfyUI.ps1 CHANGED
@@ -179,7 +179,7 @@ if (-not (Get-Command git.exe -ErrorAction SilentlyContinue)) {
179
  }
180
  Invoke-AndLog "git" "config --system core.longpaths true"
181
  Write-Log "Git is ready." -Color Green
182
- Write-Log "`nInstall Visual Studio Build Tools..." -Color Yellow
183
  winget install 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"
184
  # --- Step 2: Download and Extract ComfyUI ---
185
  Write-Log "`nStep 2: Downloading and setting up ComfyUI..." -Color Yellow
@@ -208,6 +208,26 @@ Invoke-AndLog "$pythonExecutable" "-m pip install --use-pep517 facexlib"
208
  Invoke-AndLog "$pythonExecutable" "-m pip install git+https://github.com/rodjjo/filterpy.git"
209
  Invoke-AndLog "$pythonExecutable" "-m pip install onnxruntime==1.19.2 onnxruntime-gpu==1.17.1"
210
  Invoke-AndLog "$pythonExecutable" "-s -m pip install $insightfaceWheel --no-warn-script-location"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
  # Define all custom nodes in one place
213
  $customNodes = @(
 
179
  }
180
  Invoke-AndLog "git" "config --system core.longpaths true"
181
  Write-Log "Git is ready." -Color Green
182
+ Write-Log "Install Visual Studio Build Tools." -Color Green
183
  winget install 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"
184
  # --- Step 2: Download and Extract ComfyUI ---
185
  Write-Log "`nStep 2: Downloading and setting up ComfyUI..." -Color Yellow
 
208
  Invoke-AndLog "$pythonExecutable" "-m pip install git+https://github.com/rodjjo/filterpy.git"
209
  Invoke-AndLog "$pythonExecutable" "-m pip install onnxruntime==1.19.2 onnxruntime-gpu==1.17.1"
210
  Invoke-AndLog "$pythonExecutable" "-s -m pip install $insightfaceWheel --no-warn-script-location"
211
+ Write-Log " - Installing Python include/libs for compatibility..." -Color Cyan
212
+ $pyLibsUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/python_3.12.9_include_libs.zip"
213
+ $zipPath = Join-Path $installPath "python_libs.zip"
214
+ $extractPath = Join-Path $basePath "python_embeded"
215
+
216
+ # Télécharge le fichier zip
217
+ Download-File -Uri $pyLibsUrl -OutFile $zipPath
218
+
219
+ # Extrait le contenu et nettoie l'archive
220
+ if (Test-Path $zipPath) {
221
+ try {
222
+ Write-Log " - Extracting python libs to '$extractPath'..."
223
+ Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
224
+ Write-Log " - Extraction complete." -Color Green
225
+ } catch {
226
+ Write-Log " - FAILED to extract python libs. Error: $($_.Exception.Message)" -Color Red
227
+ } finally {
228
+ Remove-Item -Path $zipPath -Force
229
+ }
230
+ }
231
 
232
  # Define all custom nodes in one place
233
  $customNodes = @(