# Converting CLIPModel to VisionTextDualEncoderModel

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconverting-clipmodel-to-visiontextdualencodermodel%2F78420%3E%5C
**Category:** 🤗Transformers\
**Created:** [March 21, 2024, 9:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconverting-clipmodel-to-visiontextdualencodermodel%2F78420 "2024-03-21T09:08:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabiozappo](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@fabiozappo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffabiozappo)%5C
**Post date:** [March 21, 2024, 9:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconverting-clipmodel-to-visiontextdualencodermodel%2F78420%2F1 "2024-03-21T09:08:09Z")

</div>

Hi HF team and thanks for your amazing work, for my research I would like to use the CLIPModel “openai/clip-vit-base-patch32” through the VisionTextDualEncoderModel class. I’ve tried to use the `from_pretrained()` method but it doesn’t support the `clip_text_model` class of the text tower.

Do you have any suggestion from where to start to create such a script?

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [March 21, 2024, 12:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconverting-clipmodel-to-visiontextdualencodermodel%2F78420%2F2 "2024-03-21T12:45:10Z")

</div>

cc @valhalla who might know this, since he worked on adding both CLIP and VisionTextDualEncoder to the Transformers library
