Skip to content

Support for CLIP #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sidd1609 opened this issue Sep 24, 2023 · 8 comments · Fixed by #527
Closed

Support for CLIP #460

Sidd1609 opened this issue Sep 24, 2023 · 8 comments · Fixed by #527

Comments

@Sidd1609
Copy link

Hello, wanted to say that the repo is really well put and maintained! really appreciate everyone's effort.

I am currently trying to visualize concept activations on the image features using model = "ViT-L/14" for CLIP.
I figured the target_layers but I am getting the issue where I need to also pass the text_features as:

ine 1501, in _call_impl
return forward_call(*args, **kwargs)
TypeError: forward() missing 1 required positional argument: 'text'

is there anyway of passing arguments to the forward call for the loaded model?

Thanks
Regards
-SriSiddarthC

@jacobgil
Copy link
Owner

Hi @Sidd1609 ,

You can create a wrapper around the model that will call it with the desired signature.

@FUIGUIMURONG
Copy link

Hello, wanted to say that the repo is really well put and maintained! really appreciate everyone's effort.

I am currently trying to visualize concept activations on the image features using model = "ViT-L/14" for CLIP. I figured the target_layers but I am getting the issue where I need to also pass the text_features as:

ine 1501, in _call_impl return forward_call(*args, **kwargs) TypeError: forward() missing 1 required positional argument: 'text'

is there anyway of passing arguments to the forward call for the loaded model?

Thanks Regards -SriSiddarthC

I also want to visualize the clip visual feature, do you slove it ?

@Sidd1609
Copy link
Author

Sidd1609 commented Nov 27, 2023 via email

@Danny-1-8
Copy link

Hello, wanted to say that the repo is really well put and maintained! really appreciate everyone's effort.

I am currently trying to visualize concept activations on the image features using model = "ViT-L/14" for CLIP. I figured the target_layers but I am getting the issue where I need to also pass the text_features as:

ine 1501, in _call_impl return forward_call(*args, **kwargs) TypeError: forward() missing 1 required positional argument: 'text'

is there anyway of passing arguments to the forward call for the loaded model?

Thanks Regards -SriSiddarthC

Hello friend,do you think the "cam" is compatible with the visual encoder of CLIP?

@Aashish75
Copy link

@Sidd1609 @Danny-1-8 @FUIGUIMURONG were any of you able to get past the "TypeError: forward() missing 1 required positional argument: 'text'" and visualise the activations on the image?

@jzousz
Copy link

jzousz commented Aug 5, 2024

I also want to visualize the clip visual feature.

@jackyjinjing
Copy link
Contributor

I tried it and it worked successfully,I'll try to add an example of a clip.

This was referenced Sep 2, 2024
@snow-like-kk
Copy link

I tried it and it worked successfully,I'll try to add an example of a clip.

Hi,I'm new in this field, can I ask u about the effect of function "reshape_transform"? I try to modify the code for annother vlm model, but there are some questions with the function. I guess the error is relevant to the model size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants