$ErrorActionPreference = "Stop" $Root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path) Set-Location $Root if (!(Get-Command py -ErrorAction SilentlyContinue) -and !(Get-Command python -ErrorAction SilentlyContinue)) { throw "Python launcher (py) or python not found" } if (Test-Path .venv) { Write-Host ".venv already exists, reusing" } else { if (Get-Command py -ErrorAction SilentlyContinue) { py -3 -m venv .venv } else { python -m venv .venv } } .\.venv\Scripts\Activate.ps1 python -m pip install --upgrade pip pip install -r requirements.txt if (!(Get-Command ffmpeg -ErrorAction SilentlyContinue)) { Write-Warning "ffmpeg not found in PATH. Please install ffmpeg and ensure PATH is updated." } New-Item -ItemType Directory -Force outputs, runtime, runtime\logs, models\ltx, models\hunyuan | Out-Null if (!(Test-Path .env)) { Copy-Item .env.example .env } Write-Host "[OK] install completed" Write-Host "next: .\\scripts\\run_server.ps1"