From 948f1c2a06f6da0c653c2edbc8c1843a3e6caa9c Mon Sep 17 00:00:00 2001 From: liferecords Date: Fri, 1 Aug 2025 16:36:19 +0800 Subject: [PATCH 1/3] Update download_model.py download models with modelscope --- tools/download_model.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/download_model.py b/tools/download_model.py index 03e36fd..32d7087 100755 --- a/tools/download_model.py +++ b/tools/download_model.py @@ -15,5 +15,10 @@ if __name__ == '__main__': if args.type == "huggingface": from huggingface_hub import snapshot_download snapshot_download(repo_id=args.name, local_dir=model_dir, local_dir_use_symlinks=False, resume_download=True) + elif args.type == "modelscope": + from modelscope import snapshot_download + snapshot_download(repo_id=args.name, local_dir=model_dir) + else: + raise ValueError(f"Invalid type: {args.type}") - print(f"model downloaded to {model_dir}") \ No newline at end of file + print(f"model downloaded to {model_dir}") From 1fd404be07e7d1ea3a97d17349e6ac1dc1005381 Mon Sep 17 00:00:00 2001 From: liferecords Date: Fri, 1 Aug 2025 16:37:06 +0800 Subject: [PATCH 2/3] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d7dedd4..a327bb4 100755 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,6 @@ openai qwen_vl_utils transformers==4.51.3 huggingface_hub +modelscope flash-attn==2.8.0.post2 -accelerate \ No newline at end of file +accelerate From f02e0ffd2593058068e052ef0f3c3c9ab4e39fa6 Mon Sep 17 00:00:00 2001 From: liferecords Date: Fri, 1 Aug 2025 16:39:02 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fb14a88..2753219 100755 --- a/README.md +++ b/README.md @@ -1015,6 +1015,9 @@ pip install -e . > 💡**Note:** Please use a directory name without periods (e.g., `DotsOCR` instead of `dots.ocr`) for the model save path. This is a temporary workaround pending our integration with Transformers. ```shell python3 tools/download_model.py + +# with modelscope +python3 tools/download_model.py --type modelscope ```