Skip to content
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

[Task]: Enable WinCLIP export #1641

Open
djdameln opened this issue Jan 16, 2024 · 5 comments · May be fixed by #2083
Open

[Task]: Enable WinCLIP export #1641

djdameln opened this issue Jan 16, 2024 · 5 comments · May be fixed by #2083
Assignees
Labels
Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute.

Comments

@djdameln
Copy link
Contributor

What is the motivation for this task?

Export is not working for the WinCLIP implementation because the masks and reference embeddings are currently not stored in the model's state dict.

Describe the solution you'd like

Enable export for WinCLIP model by registering masks and reference embeddings as buffers so that they end up in the state dict.

Additional context

Note that storing the masks and reference embeddings in the state dict is not necessary for testing and predicting, since we re-collect these attributes at the beginning of the test and predict sequence in the setup call of the lightning model.

@djdameln djdameln added the Task label Jan 16, 2024
@djdameln djdameln self-assigned this Jan 16, 2024
@samet-akcay samet-akcay added the Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute. label Feb 26, 2024
@thinhngo-x
Copy link
Contributor

Hi, isn't this already addressed in the most recent PR?

self.register_buffer_list("masks", self._generate_masks(), persistent=False) # no need to save masks
self.register_buffer("_text_embeddings", torch.empty(0))
self.register_buffer_list("_visual_embeddings", [torch.empty(0) for _ in self.scales])
self.register_buffer("_patch_embeddings", torch.empty(0))

@samet-akcay
Copy link
Contributor

@djdameln, can you confirm and close this issue if this is complete?

@samet-akcay samet-akcay removed the Task label Apr 1, 2024
@adrianboguszewski
Copy link
Contributor

@samet-akcay The model is still non-runnable in OpenVINO (due to not exported masks)

@junxnone
Copy link

junxnone commented May 23, 2024

Thanks for awesome project!


Is there a sample show how to run WinCLIP fewshot model with OpenVINO?

@junxnone junxnone linked a pull request May 23, 2024 that will close this issue
9 tasks
@junxnone
Copy link

OOM when I export the INT8_PTQ OpenVINO model for WinCLIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants