Download OVOW/examples/_common.sh from AIGeeksGroup/PhysicalWM: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/datasets/AIGeeksGroup/PhysicalWM/resolve/main/OVOW/examples/_common.sh
- Command line
-
hf download hf://datasets/AIGeeksGroup/PhysicalWM/OVOW/examples/_common.sh
-
curl -L -o _common.sh https://huggingface.co/datasets/AIGeeksGroup/PhysicalWM/resolve/main/OVOW/examples/_common.sh
2.3 kB
| ovow_preflight() { | |
| local need_motion="${1:-0}" fail=0 v | |
| if [[ "${QWEN_BACKEND:-api}" == "api" && -z "$(ovow_api_key)" ]]; then | |
| echo "[预检失败] step1 需要 Qwen 标注:在 .env 里填 DASHSCOPE_API_KEY(或 APIKEY_FILE)," | |
| echo " 或设 QWEN_BACKEND=\"local\" 走本地 Qwen3-VL(见 README「故障排查」)。" | |
| fail=1 | |
| fi | |
| if ! command -v "$BLENDER_BIN" >/dev/null 2>&1 && [[ ! -x "$BLENDER_BIN" ]]; then | |
| echo "[预检失败] 找不到 blender(合成/渲染步骤需要):装 blender 或在 .env 设 BLENDER_BIN。" | |
| fail=1 | |
| fi | |
| local pys=(OPG_PY SAM3_PY) | |
| [[ "$need_motion" == "1" ]] && pys+=(MOTION_PY) | |
| for v in "${pys[@]}"; do | |
| if [[ ! -x "${!v}" ]]; then | |
| echo "[预检失败] $v=${!v} 不是可执行的 python:确认 conda 环境已建好且 .env 填的是真实路径。" | |
| fail=1 | |
| fi | |
| done | |
| if [[ ! -f "$SAM3_CKPT" ]]; then | |
| echo "[预检失败] SAM3 权重缺失:$SAM3_CKPT(先跑 bash download_ckpts.sh,gated 仓库需 HF 登录)。" | |
| fail=1 | |
| fi | |
| if [[ "$need_motion" == "1" ]]; then | |
| local motion_ckpt_dir="$MOTION324_DIR/experiments/checkpoints" | |
| if ! compgen -G "$motion_ckpt_dir/ckpt_*.pt" >/dev/null 2>&1; then | |
| echo "[预检失败] Motion324 权重缺失:$motion_ckpt_dir/ckpt_*.pt(deform 步骤 step4 需要;" | |
| echo " 先跑 bash download_ckpts.sh)。" | |
| fail=1 | |
| fi | |
| fi | |
| return "$fail" | |
| } | |
| ovow_verify_artifacts() { | |
| local out="$1" ext="$2" missing=0 name found sz | |
| local names=( | |
| "scene_anim_blender_physics_with_deform.glb" | |
| "fullscene_deform_objseq_white_left_rgb_right_split10_h264.$ext" | |
| "fullscene_deform_objseq_textured_left_rgb_right_split10_h264.$ext" | |
| ) | |
| echo "--- 产物校验($out)---" | |
| for name in "${names[@]}"; do | |
| found="$(find "$out" -type f -name "$name" -size +1k 2>/dev/null | sort | tail -1)" | |
| if [[ -n "$found" ]]; then | |
| sz="$(du -h "$found" | cut -f1)" | |
| echo " [OK] $name ($sz)" | |
| else | |
| echo " [缺失] $name" | |
| missing=$((missing + 1)) | |
| fi | |
| done | |
| if [[ "$missing" -eq 0 ]]; then | |
| echo "--- 三个关键产物齐全,链路跑通。" | |
| return 0 | |
| fi | |
| echo "--- $missing 个产物缺失或为空:退出码为 0 也不算跑通,按上方日志定位。" | |
| return 1 | |
| } | |