| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-11-09 | 1.6 kB | |
| v1.40.3 source code.tar.gz | 2026-11-09 | 6.9 MB | |
| v1.40.3 source code.zip | 2026-11-09 | 9.2 MB | |
| Totals: 3 Items | 16.0 MB | 1 | |
Enhance
- Requires
modelscope-hub>=0.7.0. - New
modelscope.utils.file_utils.get_hub_cache_root();modelscope.hub.cache_managerre-exportsget_cache_rootandresolve_cached_snapshot.MS_CACHE_HOMEis normalised to an absolute path when bridged into the hub config.
Fix
model_file_download(..., local_files_only=True)no longer calls the API to resolve the default revision, so offline downloads from cache work without network access or credentials.ms clear-cachelists every resolved target before deleting and delegates to modelscope-hub's scoped cache APIs; cache deletion viaFileSystemCachegoes through the same validated removal, refusing empty identifiers, path traversal, out-of-root targets and symlinked paths.update_local_modelno longer copies models that already live under the legacy model root or the modelscope-hub cache root.- Hugging Face patch:
hf_hub_downloadtranslates missing files toEntryNotFoundErrorand cache misses toLocalEntryNotFoundError, so callers relying on Hugging Face exception types keep working. modelscope.hub.snapshot_downloadexportsInvalidParameteragain, preserving the shim module's exception contract.
Docs
- Docstrings for the legacy cache-path helpers now state that they describe the legacy layout only and point to
get_hub_cache_root(),snapshot_download()andresolve_cached_snapshot().
What's Changed
- Offline Download & Cache Cleanup Fixes by @wangxingjun778 in https://github.com/modelscope/modelscope/pull/1844
Full Changelog: https://github.com/modelscope/modelscope/compare/v1.40.2...v1.40.3