Get modelscope cache dir, default location or setting with MODELSCOPE_CACHE Returns: str: the modelscope cache root.
()
| 48 | |
| 49 | |
| 50 | def get_modelscope_cache_dir() -> str: |
| 51 | """Get modelscope cache dir, default location or |
| 52 | setting with MODELSCOPE_CACHE |
| 53 | |
| 54 | Returns: |
| 55 | str: the modelscope cache root. |
| 56 | """ |
| 57 | return os.path.expanduser( |
| 58 | os.getenv('MODELSCOPE_CACHE', get_default_modelscope_cache_dir())) |
| 59 | |
| 60 | |
| 61 | def get_model_cache_root() -> str: |
searching dependent graphs…