download_model_weight_files.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Download Model Weight Files
  2. ==============================
  3. Model downloads are divided into initial downloads and updates to the
  4. model directory. Please refer to the corresponding documentation for
  5. instructions on how to proceed.
  6. Initial download of model files
  7. ------------------------------
  8. 1. Download the Model from Hugging Face
  9. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. Use a Python Script to Download Model Files from Hugging Face
  11. .. code:: bash
  12. pip install huggingface_hub
  13. wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
  14. python download_models_hf.py
  15. The Python script will automatically download the model files and
  16. configure the model directory in the configuration file.
  17. The configuration file can be found in the user directory, with the
  18. filename ``magic-pdf.json``.
  19. How to update models previously downloaded
  20. -----------------------------------------
  21. 1. Models downloaded via Hugging Face or Model Scope
  22. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  23. If you previously downloaded models via Hugging Face or Model Scope, you
  24. can rerun the Python script used for the initial download. This will
  25. automatically update the model directory to the latest version.