OFA-Sys / Chinese-CLIP

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

通过pip安装的cn_clip库方法load_from_name不能加载本地模型 #342

Open qiuchen001 opened 1 month ago

qiuchen001 commented 1 month ago

我在一个新的项目中,使用pip install cn_clip安装了cn_clip,当我尝试加载本地模型时,却发现load_from_name无法加载本地模型

github上的cn_clip中的load_from_name方法: image pip安装的cn_clip中的load_from_name方法: image pip安装的cn_clip基本信息:

Name: cn-clip Version: 1.5.1 Summary: the Chinese version of CLIP. Home-page: https://github.com/OFA-Sys/Chinese-CLIP Author: OFA-Sys Author-email: License: Location: e:\playground\ai\clip-dev\text_image_search\venv\lib\site-packages Requires: lmdb, numpy, six, timm, torch, torchvision, tqdm Required-by:

qiuchen001 commented 1 month ago

cn_clip This folder can be copied to the desired project to temporarily fix the problem。

But this is not a permanent solution, hopefully the project team can synchronize the updates in the pip repo soon!