Upload Install-ComfyUI.ps1
Browse files
scripts/ComfyUI/Install-ComfyUI.ps1
CHANGED
|
@@ -1,35 +1,37 @@
|
|
| 1 |
#Requires -RunAsAdministrator
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
<#
|
| 4 |
.SYNOPSIS
|
| 5 |
A complete, all-in-one installer for ComfyUI and its environment.
|
| 6 |
.DESCRIPTION
|
| 7 |
-
This
|
| 8 |
-
|
| 9 |
-
- Directly installs the Aria2 binary for accelerated downloads.
|
| 10 |
-
- Installs Git and 7-Zip if they are missing.
|
| 11 |
-
- Downloads and extracts the latest portable version of ComfyUI.
|
| 12 |
-
- Installs a comprehensive list of custom nodes and their Python dependencies.
|
| 13 |
-
It is designed to be fully compatible with PowerShell 5.1 (standard on Windows 10).
|
| 14 |
.NOTES
|
| 15 |
Author: Code Partner (based on original scripts and user feedback)
|
| 16 |
-
Version:
|
| 17 |
#>
|
| 18 |
|
| 19 |
#===========================================================================
|
| 20 |
# SECTION 1: SCRIPT CONFIGURATION & HELPER FUNCTIONS
|
| 21 |
#===========================================================================
|
| 22 |
|
| 23 |
-
# --- Force TLS 1.2 for all web requests
|
| 24 |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
| 25 |
|
| 26 |
# --- Path & Log Variables ---
|
| 27 |
-
|
| 28 |
-
$basePath = Join-Path $
|
| 29 |
$comfyPath = Join-Path $basePath "ComfyUI"
|
| 30 |
$pythonExecutable = Join-Path $basePath "python_embeded\python.exe"
|
| 31 |
$customNodesPath = Join-Path $comfyPath "custom_nodes"
|
| 32 |
-
$logPath = Join-Path $
|
| 33 |
$logFile = Join-Path $logPath "install_log.txt"
|
| 34 |
$sevenZipPath = "C:\Program Files\7-Zip\7z.exe" # Default path
|
| 35 |
|
|
|
|
| 1 |
#Requires -RunAsAdministrator
|
| 2 |
|
| 3 |
+
# --- NOUVEAU : Définition des paramètres du script ---
|
| 4 |
+
param(
|
| 5 |
+
# Définit le chemin d'installation.
|
| 6 |
+
# Si le script est lancé sans cet argument, il utilisera son propre dossier par défaut.
|
| 7 |
+
[string]$InstallPath = $PSScriptRoot
|
| 8 |
+
)
|
| 9 |
+
|
| 10 |
<#
|
| 11 |
.SYNOPSIS
|
| 12 |
A complete, all-in-one installer for ComfyUI and its environment.
|
| 13 |
.DESCRIPTION
|
| 14 |
+
This script can be run standalone or from a launcher. It accepts an -InstallPath
|
| 15 |
+
parameter to define the installation directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
.NOTES
|
| 17 |
Author: Code Partner (based on original scripts and user feedback)
|
| 18 |
+
Version: 6.0 (Flexible Install Path)
|
| 19 |
#>
|
| 20 |
|
| 21 |
#===========================================================================
|
| 22 |
# SECTION 1: SCRIPT CONFIGURATION & HELPER FUNCTIONS
|
| 23 |
#===========================================================================
|
| 24 |
|
| 25 |
+
# --- Force TLS 1.2 for all web requests ---
|
| 26 |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
| 27 |
|
| 28 |
# --- Path & Log Variables ---
|
| 29 |
+
# Le chemin d'installation est maintenant déterminé par le paramètre -InstallPath
|
| 30 |
+
$basePath = Join-Path $InstallPath "ComfyUI_windows_portable"
|
| 31 |
$comfyPath = Join-Path $basePath "ComfyUI"
|
| 32 |
$pythonExecutable = Join-Path $basePath "python_embeded\python.exe"
|
| 33 |
$customNodesPath = Join-Path $comfyPath "custom_nodes"
|
| 34 |
+
$logPath = Join-Path $InstallPath "logs"
|
| 35 |
$logFile = Join-Path $logPath "install_log.txt"
|
| 36 |
$sevenZipPath = "C:\Program Files\7-Zip\7z.exe" # Default path
|
| 37 |
|