# Converting CLIPModel to VisionTextDualEncoderModel

**URL:** <https://discuss.huggingface.co/t/converting-clipmodel-to-visiontextdualencodermodel/78420>\
**Category:** 🤗Transformers\
**Created:** [March 21, 2024, 9:08am UTC](https://discuss.huggingface.co/t/converting-clipmodel-to-visiontextdualencodermodel/78420 "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](https://discuss.huggingface.co/u/fabiozappo)\
**Post date:** [March 21, 2024, 9:08am UTC](https://discuss.huggingface.co/t/converting-clipmodel-to-visiontextdualencodermodel/78420/1 "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](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [March 21, 2024, 12:45pm UTC](https://discuss.huggingface.co/t/converting-clipmodel-to-visiontextdualencodermodel/78420/2 "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
