#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" export UV_CACHE_DIR="$(pwd)/.uv-cache" mkdir -p "$UV_CACHE_DIR" if ! command -v uv >/dev/null 2>&1; then echo "[QwenImageEditLite] 'uv' not found on PATH. Installing uv ..." if command -v curl >/dev/null 2>&1; then curl -LsSf https://astral.sh/uv/install.sh | sh elif command -v wget >/dev/null 2>&1; then wget -qO- https://astral.sh/uv/install.sh | sh else echo "[QwenImageEditLite] need curl or wget to install uv, or install uv manually." exit 1 fi export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH" fi if [ ! -x ".venv/bin/python" ]; then echo "[QwenImageEditLite] .venv not found." echo "[QwenImageEditLite] Run install.sh first." exit 1 fi if [ ! -f "config.ini" ]; then echo "[QwenImageEditLite] config.ini not found." exit 1 fi echo "[QwenImageEditLite] Launching WebUI on 0.0.0.0 (LAN accessible) ..." exec .venv/bin/python -m qwen_image_edit_lite.webui "$@"