You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error when I use clip to load the local model, my code is as follows:
.map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch16', modality='image', checkpoint_path='./model/clip-vit-base-patch16/pytorch_model.bin').
The error that occurs is as follows:
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 108, in init
self.model = Model(real_name, modality, checkpoint_path, device)
File "/root/anaconda3/envs/towhee_env/lib/python3.7/site-packages/towhee/runtime/runtime_conf.py", line 88, in _decorated
return model(*args, **kwargs)
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 79, in init
self.model = create_model(model_name, modality, checkpoint_path, device)
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 44, in create_model
hf_clip_config = CLIPModel. from_config(model_name)
AttributeError: type object 'CLIPModel' has no attribute 'from_config'
How to solve this problem? How do i load local models?
The text was updated successfully, but these errors were encountered:
There is an error when I use clip to load the local model, my code is as follows:
.map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch16', modality='image', checkpoint_path='./model/clip-vit-base-patch16/pytorch_model.bin').
The error that occurs is as follows:
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 108, in init
self.model = Model(real_name, modality, checkpoint_path, device)
File "/root/anaconda3/envs/towhee_env/lib/python3.7/site-packages/towhee/runtime/runtime_conf.py", line 88, in _decorated
return model(*args, **kwargs)
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 79, in init
self.model = create_model(model_name, modality, checkpoint_path, device)
File "/root/.towhee/operators/image-text-embedding/clip/versions/main/clip.py", line 44, in create_model
hf_clip_config = CLIPModel. from_config(model_name)
AttributeError: type object 'CLIPModel' has no attribute 'from_config'
How to solve this problem? How do i load local models?
The text was updated successfully, but these errors were encountered: