OFA-Sys / Chinese-CLIP

Chinese version of CLIP which achieves Chinese cross-modal retrieval and representation generation.
MIT License
4.5k stars 464 forks source link

下载模型出错 #113

Closed kydbj closed 1 year ago

kydbj commented 1 year ago

使用网站的实例代码,出现下面的错误 Traceback (most recent call last): File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/simplejson/init.py", line 514, in loads return _default_decoder.decode(s) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/simplejson/decoder.py", line 386, in decode obj, end = self.raw_decode(s) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/simplejson/decoder.py", line 416, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/pipelines/util.py", line 35, in is_official_hubimpl = HubApi().get_model(path, revision=revision) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/hub/api.py", line 222, in get_model if is_ok(r.json()): File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/multiModal/test.py", line 11, in model='damo/multi-modal_clip-vit-large-patch14_336_zh', model_revision='v1.0.1') File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/pipelines/builder.py", line 100, in pipeline model = normalize_model_input(model, model_revision) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/pipelines/builder.py", line 25, in normalize_model_input if isinstance(model, str) and is_official_hub_path(model, model_revision): File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/pipelines/util.py", line 41, in is_official_hub_path return is_official_hub_impl(path) File "/root/anaconda3/envs/modelscope/lib/python3.7/site-packages/modelscope/pipelines/util.py", line 38, in is_official_hub_impl raise ValueError(f'invalid model repo path {e}') ValueError: invalid model repo path Expecting value: line 1 column 1 (char 0)

yangapku commented 1 year ago

您好,看到您使用的是modelscope适配版本的chinese-clip,相关问题可能涉及到了modelscope本身框架的基本功能,可以在modelscope用户答疑群或开源代码库询问哈。或者,更建议您可以尝试下使用我们在本代码库中,原生版本的chinese-clip,因为整个都是我们维护的,不涉及modelscope的问题,我们比较容易排查。如果还有问题的话,您再继续询问我们就好哈。