download_model_weight_files.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 Git LFS
  22. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  23. Due to feedback from some users that downloading model files using
  24. git lfs was incomplete or resulted in corrupted model files, this
  25. method is no longer recommended.
  26. If you previously downloaded model files via git lfs, you can navigate
  27. to the previous download directory and use the ``git pull`` command to
  28. update the model.
  29. 2. Models downloaded via Hugging Face or Model Scope
  30. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  31. If you previously downloaded models via Hugging Face or Model Scope, you
  32. can rerun the Python script used for the initial download. This will
  33. automatically update the model directory to the latest version.