setup.sh: verify weight downloads (size + presence guards); download path exercised (206 range fetches, magic bytes, PR-rev URL, totals 1.08 GB / 281 MB)
This commit is contained in:
1 parent
392fa6326f
commit
5bc1815ebc
1 file changed
+10
@@ -65,6 +65,16 @@ if [[ $SKIP_WEIGHTS == 0 ]]; then
|
|||||||
# YOLOv9-E icon detector (upstream recommends the icon_detect_v3 revision)
|
# YOLOv9-E icon detector (upstream recommends the icon_detect_v3 revision)
|
||||||
curl -fSL --retry 3 -o weights/icon_detect_v3/model.pt \
|
curl -fSL --retry 3 -o weights/icon_detect_v3/model.pt \
|
||||||
"https://huggingface.co/microsoft/OmniParser-v2.0/resolve/refs%2Fpr%2F37/icon_detect_v3/model.pt"
|
"https://huggingface.co/microsoft/OmniParser-v2.0/resolve/refs%2Fpr%2F37/icon_detect_v3/model.pt"
|
||||||
|
# fail at setup, not as a cryptic model-load crash at boot
|
||||||
|
for f in weights/icon_caption_florence/model.safetensors weights/icon_detect_v3/model.pt; do
|
||||||
|
[[ $(stat -c%s "$f" 2>/dev/null || echo 0) -gt 100000000 ]] || {
|
||||||
|
echo "FAILED: $f missing or truncated (got $(stat -c%s "$f" 2>/dev/null || echo 0) bytes)"
|
||||||
|
echo " (HTML error pages land here too - check network/HF status)"; exit 1; }
|
||||||
|
done
|
||||||
|
for f in weights/icon_caption_florence/config.json weights/icon_caption_florence/generation_config.json; do
|
||||||
|
test -s "$f" || { echo "FAILED: $f empty"; exit 1; }
|
||||||
|
done
|
||||||
|
echo "== weights verified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.venv/bin/python - <<'EOF'
|
.venv/bin/python - <<'EOF'
|
||||||
|
|||||||
Reference in new issue
Block a user