OmniParser icon indicating copy to clipboard operation
OmniParser copied to clipboard

Add weights_install.py for Cross-Platform Weight Installation

Open k-w-lee opened this issue 2 days ago • 1 comments

Add weights_install.py for Cross-Platform Weight Installation

Description:
This PR introduces a new Python script, weights_install.py, to simplify downloading model weights using the Hugging Face CLI. The script ensures compatibility across Windows, macOS, and Linux, providing an alternative to the existing Bash-based installation method. Additionally, the README has been updated to reflect this new installation option.

Changes:

  1. Initialize weights_install.py – Added a Python script to download weights.
  2. Implement weight download logic – Uses Hugging Face CLI with automated directory handling.
  3. Rename icon_caption to icon_caption_florence – Ensures consistency with expected folder structure.
  4. Update README – Added instructions for using weights_install.py as an alternative installation method.

Why?

  • The Bash script is not natively supported on Windows.
  • The Python script provides a universal solution for all operating systems.

Testing:

  • ✅Verified weight downloads successfully on macOS and Linux.
  • ✅Tested on Windows to ensure smooth execution.

Let me know if any changes are needed! 🚀

k-w-lee avatar Feb 20 '25 03:02 k-w-lee