towhee-io / towhee

Towhee is a framework that is dedicated to making neural data processing pipelines simple and fast.
https://towhee.io
Apache License 2.0
3.22k stars 248 forks source link

[Feature]: About function: ops.video_text_embedding.clip4clip(model_name='clip_vit_b32', modality='video', device='cuda:1') #2704

Closed Bowei-Jiang closed 1 month ago

Bowei-Jiang commented 1 month ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

I download clip model on machine, and I want to load local clip model to run the function "ops.video_text_embedding.clip4clip()".

For example, my codes are: "ops.video_text_embedding.clip4clip(model_name='/root/data/clip_model/clip-vit-large-patch14', modality='video', device='cuda:1')", however, this error occurs:

ValueError: Invalid model name '/root/data/clip_model/clip-vit-large-patch14',

Could anyone tell me how can I load the local clip model when running ops.video_text_embedding.clip4clip() ?

Describe the solution you'd like.

No response

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

junjiejiangjjj commented 1 month ago

hi @Bowei-Jiang , you can specify your weight through the weight_path parameter : ops.video_text_embedding.clip4clip(model_name='clip_vit_b32', modality='video', weight_path="your weights", device='cuda:1')

Bowei-Jiang commented 1 month ago

hi @Bowei-Jiang , you can specify your weight through the weight_path parameter : ops.video_text_embedding.clip4clip(model_name='clip_vit_b32', modality='video', weight_path="your weights", device='cuda:1')

OK, thanks a lot