@@ -98,7 +98,40 @@ void init_clip_text_model(py::module_& m) {
9898}
9999
100100void init_clip_text_model_with_projection (py::module_& m) {
101- auto clip_text_model_with_projection = py::class_<ov::genai::CLIPTextModelWithProjection, ov::genai::CLIPTextModel>(m, " CLIPTextModelWithProjection" , " CLIPTextModelWithProjection class." );
101+ py::class_<ov::genai::CLIPTextModelWithProjection, ov::genai::CLIPTextModel>(m, " CLIPTextModelWithProjection" , " CLIPTextModelWithProjection class." )
102+ .def (py::init ([](const std::filesystem::path& root_dir) {
103+ ScopedVar env_manager (pyutils::ov_tokenizers_module_path ());
104+ return std::make_unique<ov::genai::CLIPTextModelWithProjection>(root_dir);
105+ }),
106+ py::arg (" root_dir" ), " Model root directory" ,
107+ R"(
108+ CLIPTextModelWithProjection class
109+ root_dir (os.PathLike): Model root directory.
110+ )" )
111+ .def (py::init ([](
112+ const std::filesystem::path& root_dir,
113+ const std::string& device,
114+ const py::kwargs& kwargs
115+ ) {
116+ ScopedVar env_manager (pyutils::ov_tokenizers_module_path ());
117+ return std::make_unique<ov::genai::CLIPTextModelWithProjection>(root_dir, device, pyutils::kwargs_to_any_map (kwargs));
118+ }),
119+ py::arg (" root_dir" ), " Model root directory" ,
120+ py::arg (" device" ), " Device on which inference will be done" ,
121+ R"(
122+ CLIPTextModelWithProjection class
123+ root_dir (os.PathLike): Model root directory.
124+ device (str): Device on which inference will be done.
125+ kwargs: Device properties.
126+ )" )
127+ .def (py::init ([](const ov::genai::CLIPTextModelWithProjection& model) {
128+ return std::make_unique<ov::genai::CLIPTextModelWithProjection>(model);
129+ }),
130+ py::arg (" model" ), " CLIPText model"
131+ R"(
132+ CLIPTextModelWithProjection class
133+ model (CLIPTextModelWithProjection): CLIPText model with projection
134+ )" );
102135}
103136
104137void init_t5_encoder_model (py::module_& m) {
0 commit comments