@echo off setlocal EnableDelayedExpansion cd /d "%~dp0" set "UV_LINK_MODE=copy" set "UV_CACHE_DIR=%~dp0.uv-cache" set "UV_SKIP_WHEEL_FILENAME_CHECK=1" if not exist "%UV_CACHE_DIR%" mkdir "%UV_CACHE_DIR%" REM --- 1) ensure uv is available ---------------------------------------- where uv >nul 2>&1 if errorlevel 1 ( echo [QwenImageEditLite] 'uv' not found on PATH. Installing uv ... powershell -ExecutionPolicy Bypass -NoProfile -Command "irm https://astral.sh/uv/install.ps1 | iex" if errorlevel 1 ( echo [QwenImageEditLite] uv install failed. Please install manually: https://docs.astral.sh/uv/ pause exit /b 1 ) set "PATH=%USERPROFILE%\.local\bin;%USERPROFILE%\.cargo\bin;%PATH%" ) REM --- 2) platform hint -------------------------------------------------- echo [QwenImageEditLite] Windows x64 install path selected. echo [QwenImageEditLite] Creating Python 3.13 virtual environment. echo [QwenImageEditLite] Syncing dependencies with CUDA 13.0 PyTorch. echo [QwenImageEditLite] Allowing known wheel filename/version mismatch for bundled custom wheels. REM --- 3) create venv ---------------------------------------------------- if exist "%~dp0.venv" ( echo [QwenImageEditLite] Existing .venv detected. choice /m "Delete the existing .venv and continue" if errorlevel 2 ( echo [QwenImageEditLite] Install cancelled. Existing .venv was kept. pause exit /b 1 ) echo [QwenImageEditLite] Removing existing .venv ... rmdir /s /q "%~dp0.venv" ) uv venv .venv --python 3.13 if errorlevel 1 ( echo [QwenImageEditLite] failed to create Python 3.13 virtual environment. pause exit /b 1 ) REM --- 4) install deps --------------------------------------------------- uv sync --extra cu130 if errorlevel 1 ( echo [QwenImageEditLite] dependency install failed. pause exit /b 1 ) REM --- 5) verify bundled runtime ---------------------------------------- if not exist "%~dp0vendor\comfyui\nodes.py" ( echo [QwenImageEditLite] bundled vendor\comfyui runtime not found. pause exit /b 1 ) if not exist "%~dp0config.ini" ( echo [QwenImageEditLite] config.ini not found. pause exit /b 1 ) echo. echo [QwenImageEditLite] Install complete. echo [QwenImageEditLite] Virtual environment: echo .venv (Python 3.13) echo [QwenImageEditLite] Bundled runtime: echo vendor\comfyui echo [QwenImageEditLite] Attention backend: echo optional CUDA attention packages synced from pyproject.toml echo [QwenImageEditLite] Put model files under: echo models\diffusion_models echo models\vae echo models\text_encoders echo [QwenImageEditLite] Put LoRA files under: echo loras echo [QwenImageEditLite] Input images can be placed under: echo input endlocal