wan-studio / scripts /verify_local.sh
techfreakworm's picture
Stabilize startup: lazy model load + wan2.1-t2v-14b stitch bundle
e2bcf63 verified
Raw
History Blame Contribute Delete
1.11 kB
#!/usr/bin/env bash
# Local (CPU, no-GPU) verification harness for Wan Studio development.
#
# Runs the fast checks that do NOT need a GPU or real model weights:
# 1. ruff lint over the repo
# 2. unit/logic test suite (registry / preset / budget / backend / handle)
# 3. a Gradio UI-construction smoke (`build()` constructs the Blocks tree)
#
# It deliberately does NOT run real inference — the Wan pipelines need a
# ZeroGPU slice and multi-GB weights, so end-to-end generation is verified
# on the deployed Space, not here. See PLAN-wan-studio.md "Verification".
#
# Usage: bash scripts/verify_local.sh
# Assumes a .venv built from requirements (plus ruff + pytest), e.g.:
# python3.12 -m venv .venv && .venv/bin/pip install -r requirements.txt ruff pytest
set -euo pipefail
cd "$(dirname "$0")/.."
PY="${WAN_STUDIO_VENV_PY:-.venv/bin/python}"
RUFF="$(dirname "$PY")/ruff"
echo "== ruff =="
"$RUFF" check .
echo "== pytest =="
"$PY" -m pytest tests/ -q -p no:cacheprovider
echo "== build() UI smoke =="
"$PY" -c "from app import build; build(); print('build OK')"
echo "ALL LOCAL CHECKS PASSED"