File size: 3,635 Bytes
90e5fef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@echo off
setlocal EnableDelayedExpansion

:: ====================================================
::                  Script Configuration
:: ====================================================
:: Note: For an English system, setting code page 936 (Simplified Chinese) is usually not needed.
:: If you need to display specific non-ASCII characters, consider chcp 65001 (UTF-8).
:: chcp 936 >nul

:: Project directory configuration (modify here to change the target directory)
:: Note: As per your request not to change directories, this variable is primarily for informational display in this script, not for actual directory switching.
set "PROJECT_DIR=%~dp0ComfyUI"

:: Initialize error flag
set ERROR_OCCURRED=0

REM =====================================
REM Copyright Information Display
REM =====================================
echo.
echo =====================================
echo This integrated package is created by: HeGenAI
echo =====================================
echo Author: HeGenAI
echo E-mail:hesgenai@gmail.com
echo Telegram: @hegenai
echo YouTube @hesgenai
echo ====================================================
echo China - Update Address: https://pan.quark.cn/s/248b41dd8ee1
echo GitHub: https://github.com/msola-ht/ComfyUI-Windows-Portable
echo =====================================
echo Usage Declaration:
echo Please refer to the official project and model pages for licensing information.
echo This integrated package is for experience, academic, and research use only.
echo =====================================
echo.
REM =============

:: ====================================================
::                  Environment Check
:: ====================================================
echo [INFO] Performing environment check...
echo.

:: Set CUDA architecture list
set TORCH_CUDA_ARCH_LIST=7.5 8.6 8.9 12.0

:: ====================================================
::                  Path Configuration
:: ====================================================
:: Add MinGit to PATH
set "PATH=%PATH%;%~dp0MinGit\cmd"

:: ====================================================
::                  Directory Switching Module
:: ====================================================
:: As per your request, this module is commented out and will not perform directory switching.
:: echo [INFO] Changing to project directory...
:: if exist "%PROJECT_DIR%" (
::     cd /d "%PROJECT_DIR%"
::     echo [SUCCESS] Entered directory: %PROJECT_DIR%
:: ) else (
::     cd /d "%~dp0"
::     echo [WARNING] Project directory not found, entered script's directory: %CD%
:: )
:: echo.
echo [INFO] The script will remain in the current directory: %CD%
echo.


echo ====================================================
echo [SUCCESS] Environment activated successfully!
echo Current working directory: %CD%
echo Proxy settings: %HTTP_PROXY%
echo Type 'exit' to leave this environment.
echo ====================================================
echo.
.\venv\python.exe .\Script\comfyui_down.py
:: Keep terminal interactive
cmd /k "echo [INFO] Entered interactive mode. You can execute commands here."

:: Normal exit
exit /b 0

:: ====================================================
::                  Error Handling
:: ====================================================
:error
echo.
echo ====================================================
echo [ERROR] Environment initialization failed!
echo Possible causes:
echo 1. Missing required components
echo 2. Incorrect path configuration
echo 3. Permissions issue
echo 4. Corrupted environment
echo ====================================================
echo.

pause
exit /b 1