UmeAiRT commited on
Commit
97a97fb
·
verified ·
1 Parent(s): 9126551

Upload UmeAiRT-Install-ComfyUI.bat

Browse files
Files changed (1) hide show
  1. UmeAiRT-Install-ComfyUI.bat +56 -57
UmeAiRT-Install-ComfyUI.bat CHANGED
@@ -1,58 +1,57 @@
1
- @echo off
2
-
3
- :: ============================================================================
4
- :: Section 1: Checking and requesting administrator privileges
5
- :: ============================================================================
6
- net session >nul 2>&1
7
- if %errorlevel% NEQ 0 (
8
- echo [INFO] Requesting administrator privileges...
9
- powershell.exe -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
10
- exit
11
- )
12
-
13
- :: ============================================================================
14
- :: Section 2: Updated scripts from Github
15
- :: ============================================================================
16
- title UmeAiRT ComfyUI Installer
17
- echo [OK] Administrator privileges confirmed.
18
- echo.
19
-
20
- set "ScriptsFolder=%~dp0scripts"
21
- if not exist "%ScriptsFolder%" (
22
- echo [INFO] Creating the folder for the scripts: %ScriptsFolder%
23
- mkdir "%ScriptsFolder%"
24
- )
25
- echo [INFO] Downloading the latest versions of the installation scripts...
26
-
27
- echo - Download of Install-ComfyUI.ps1...
28
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Install-ComfyUI.ps1' -OutFile '%ScriptsFolder%\Install-ComfyUI.ps1'"
29
- echo - Download of Update-ComfyUI.ps1...
30
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Update-ComfyUI.ps1' -OutFile '%ScriptsFolder%\Update-ComfyUI.ps1'"
31
- echo - Download of Download-FLUX-Models.ps1...
32
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Download-FLUX-Models.ps1' -OutFile '%ScriptsFolder%\Download-FLUX-Models.ps1'"
33
- echo - Download of Download-WAN-Models.ps1...
34
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Download-WAN-Models.ps1' -OutFile '%ScriptsFolder%\Download-WAN-Models.ps1'"
35
- echo - Download of Download-HIDREAM-Models.ps1...
36
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Download-HIDREAM-Models.ps1' -OutFile '%ScriptsFolder%\Download-HIDREAM-Models.ps1'"
37
- echo - Download of Download-LTXV-Models.ps1...
38
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/scripts/Download-LTXV-Models.ps1' -OutFile '%ScriptsFolder%\Download-LTXV-Models.ps1'"
39
-
40
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/UmeAiRT-Start-ComfyUI.bat' -OutFile '%~dp0UmeAiRT-Start-ComfyUI.bat'"
41
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/UmeAiRT-Download_models.bat' -OutFile '%~dp0UmeAiRT-Download_models.bat'"
42
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/refs/heads/main/UmeAiRT-Update-ComfyUI.bat' -OutFile '%~dp0UmeAiRT-Update-ComfyUI.bat'"
43
-
44
- echo [OK] Updated scripts.
45
- echo.
46
-
47
- :: ============================================================================
48
- :: Section 3: Running the main script
49
- :: ============================================================================
50
- echo [INFO] Launching the main installation script...
51
- echo.
52
-
53
- REM NOUVEAU : On passe le chemin d'installation en argument avec -InstallPath
54
- powershell.exe -ExecutionPolicy Bypass -File "%ScriptsFolder%\Install-ComfyUI.ps1" -InstallPath "%~dp0"
55
-
56
- echo.
57
- echo [INFO] The script execution is complete.
58
  pause
 
1
+ @echo off
2
+ setlocal
3
+
4
+ :: ============================================================================
5
+ :: Section 1: Checking and requesting administrator privileges
6
+ :: ============================================================================
7
+ net session >nul 2>&1
8
+ if %errorlevel% NEQ 0 (
9
+ echo [INFO] Requesting administrator privileges...
10
+ powershell.exe -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
11
+ exit /b
12
+ )
13
+
14
+ :: ============================================================================
15
+ :: Section 2: Bootstrap downloader for all scripts
16
+ :: ============================================================================
17
+ title UmeAiRT ComfyUI Installer
18
+ echo [OK] Administrator privileges confirmed.
19
+ echo.
20
+
21
+ :: Set a "clean" install path variable by removing any trailing backslash.
22
+ :: This prevents potential issues with path concatenation later in the script.
23
+ set "InstallPath=%~dp0"
24
+ if "%InstallPath:~-1%"=="\" set "InstallPath=%InstallPath:~0,-1%"
25
+
26
+ set "ScriptsFolder=%InstallPath%\scripts"
27
+ set "BootstrapScript=%ScriptsFolder%\Bootstrap-Downloader.ps1"
28
+ set "BootstrapUrl=https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/main/scripts/Bootstrap-Downloader.ps1"
29
+
30
+ :: Create scripts folder if it doesn't exist
31
+ if not exist "%ScriptsFolder%" (
32
+ echo [INFO] Creating the scripts folder: %ScriptsFolder%
33
+ mkdir "%ScriptsFolder%"
34
+ )
35
+
36
+ :: Download the bootstrap script
37
+ echo [INFO] Downloading the bootstrap script...
38
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%BootstrapUrl%' -OutFile '%BootstrapScript%'"
39
+
40
+ :: Run the bootstrap script to download all other files
41
+ echo [INFO] Running the bootstrap script to download all required files...
42
+ :: Pass the clean install path to the PowerShell script.
43
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%BootstrapScript%" -InstallPath "%InstallPath%"
44
+ echo [OK] Bootstrap download complete.
45
+ echo.
46
+
47
+ :: ============================================================================
48
+ :: Section 3: Running the main installation script
49
+ :: ============================================================================
50
+ echo [INFO] Launching the main installation script...
51
+ echo.
52
+ :: Pass the clean install path to the PowerShell script.
53
+ powershell.exe -ExecutionPolicy Bypass -File "%ScriptsFolder%\Install-ComfyUI.ps1" -InstallPath "%InstallPath%"
54
+
55
+ echo.
56
+ echo [INFO] The script execution is complete.
 
57
  pause