diff --git a/setup.sh b/setup.sh index 2fb5a8d..fc34589 100755 --- a/setup.sh +++ b/setup.sh @@ -34,6 +34,10 @@ fi echo "== rest of requirements (a few minutes)" .venv/bin/pip install -q -r requirements.txt +if [[ $SKIP_WEIGHTS == 0 && -f weights/icon_detect_v3/model.pt && -f weights/icon_caption_florence/model.safetensors ]]; then + echo "== weights already present - skipping download" + SKIP_WEIGHTS=1 +fi if [[ $SKIP_WEIGHTS == 0 ]]; then echo "== weights (~1.8 GB from huggingface.co/microsoft/OmniParser-v2.0)" mkdir -p weights/icon_caption_florence weights/icon_detect_v3 diff --git a/weights b/weights new file mode 120000 index 0000000..e40420b --- /dev/null +++ b/weights @@ -0,0 +1 @@ +/home/plean/omni/OmniParser/weights \ No newline at end of file