@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