English | 简体中文
This script is for demonstration purposes only. It is for personal use only and must not be used for commercial purposes.
Downloads models from ModelScope, then moves and renames them under models\. It now supports interactive selection instead of always downloading everything. Downloads run concurrently (default 3 at a time), and each download is retried automatically on timeout or failure.
Available models (number, size, destination folder and description are listed at runtime):
| Group | Model | Destination |
|---|---|---|
| LLM | DeviLeo/Qwen3-4B-int4-ov |
models\llm |
| Embedding | DeviLeo/bge-m3-int4-sym-ov |
models\emb |
| Rerank | DeviLeo/bge-reranker-v2-m3-int4-sym-ov |
models\rerank |
| MMR | DeviLeo/gme-Qwen2-VL-2B-Instruct-int4-sym-ov |
models\mmr\gme |
| ASR | DeviLeo/FunASR-ov |
models\asr |
| OCR | DeviLeo/PaddleOCR-ov |
models\ocr |
| Action | DeviLeo/BossActionRecognition |
models\bar |
| VLM | DeviLeo/Qwen3-VL-4B-Instruct-int4-ov |
models\vlm |
| Splitter | DeviLeo/zh_core_web_sm-3.8.0 |
models\splitter |
| Splitter | DeviLeo/en_core_web_sm-3.8.0 |
models\splitter |
Only one splitter model can be used — both map to
models\splitter. If both are selected, the Chinese splitter is kept and the English one is skipped.
- Python 3.9+
- Install ModelScope SDK:
pip install modelscopeRun in your command line:
python download_modelscope_models.pyThe script will:
- Ask you to choose the script language (Chinese / English);
- If
--rootis not given, ask for the GameAssistantToolServer directory (press Enter to use the current directory, so models land under./models); - List all models with their size (based on the installed size under
..\GameAssistantToolServer\models), destination folder and a short description; - Choose which models to download:
- On an interactive terminal: use ↑/↓ to move, Space to toggle,
ato select all, Enter to confirm,q/0to cancel; - In non-interactive environments (piped / scripted): falls back to numbered input — comma-separated numbers or ranges are supported (e.g.
1,3-5),allselects everything,0cancels;
- On an interactive terminal: use ↑/↓ to move, Space to toggle,
- Check the destination folders first — models that are already present are skipped;
- After confirmation, download the remaining models (concurrently by default) and move them to their destinations. A failed or timed-out download is retried automatically.
Pre-select the splitter model as the default choice:
python download_modelscope_models.py --splitter zh
python download_modelscope_models.py --splitter enSpecify the GameAssistantToolServer directory (where models\ will be created; skips the interactive prompt):
python download_modelscope_models.py --root "C:\path\to\GameAssistantToolServer" --splitter zhDownloads run concurrently (default: 3 models at a time), each with a timeout and automatic retry on timeout or failure.
| Option | Default | Description |
|---|---|---|
--workers N |
3 | Number of models to download at the same time. Set 1 to download one at a time. |
--retries N |
3 | Max retries per model after a failed / timed-out attempt. Set 0 to never retry. |
--timeout N |
1800 | Per-attempt download timeout in seconds. Set 0 to disable the timeout. |
python download_modelscope_models.py --workers 4 --retries 5 --timeout 3600While concurrent downloads are running, the progress bars printed by the ModelScope SDK may interleave on the terminal — this is cosmetic only.
- Before downloading, the script checks each destination folder:
- If the same model is already present (detected via the
.modelscope_model_idmarker, or by comparing the folder size) it is skipped; - If the folder exists but its content does not match (it may be a different model), you are asked whether to overwrite it;
- If the folder is empty or missing, the model is downloaded normally.
- If the same model is already present (detected via the
- If all selected models are already present, the script finishes without downloading anything.
- After installing a model, the script writes a
.modelscope_model_idmarker into the folder for later detection. - The script creates a temporary cache folder
_modelscope_download_cache. It is cleaned up automatically when all selected models download successfully; if some models still fail after retries, the cache is kept so a re-run can resume the partial downloads.