@@ -208,13 +208,13 @@ class InputModel::InputModelIRImpl {
208208 std::unordered_map<std::string, ov::OpSet> m_opsets;
209209 pugi::xml_node m_root;
210210 pugi::xml_document m_xml_doc;
211- std::string m_weights_path;
211+ std::filesystem::path m_weights_path;
212212
213213public:
214214 InputModelIRImpl (std::istream& model,
215215 const std::shared_ptr<ov::AlignedBuffer>& weights,
216216 const std::unordered_map<ov::DiscreteTypeInfo, ov::BaseOpExtension::Ptr>& extensions,
217- std::string weights_path)
217+ std::filesystem::path weights_path)
218218 : m_weights(weights),
219219 m_extensions (extensions),
220220 m_weights_path(std::move(weights_path)) {
@@ -226,7 +226,7 @@ class InputModel::InputModelIRImpl {
226226 InputModelIRImpl (const std::shared_ptr<ov::AlignedBuffer>& model,
227227 const std::shared_ptr<ov::AlignedBuffer>& weights,
228228 const std::unordered_map<ov::DiscreteTypeInfo, ov::BaseOpExtension::Ptr>& extensions,
229- std::string weights_path)
229+ std::filesystem::path weights_path)
230230 : m_weights(weights),
231231 m_extensions(extensions),
232232 m_weights_path(std::move(weights_path)) {
@@ -249,14 +249,14 @@ class InputModel::InputModelIRImpl {
249249InputModel::InputModel (std::istream& model,
250250 const std::shared_ptr<ov::AlignedBuffer>& weights,
251251 const std::unordered_map<ov::DiscreteTypeInfo, ov::BaseOpExtension::Ptr>& extensions,
252- std::string weights_path) {
252+ std::filesystem::path weights_path) {
253253 _impl = std::make_shared<InputModelIRImpl>(model, weights, extensions, std::move (weights_path));
254254}
255255
256256InputModel::InputModel (const std::shared_ptr<ov::AlignedBuffer>& model,
257257 const std::shared_ptr<ov::AlignedBuffer>& weights,
258258 const std::unordered_map<ov::DiscreteTypeInfo, ov::BaseOpExtension::Ptr>& extensions,
259- std::string weights_path) {
259+ std::filesystem::path weights_path) {
260260 _impl = std::make_shared<InputModelIRImpl>(model, weights, extensions, std::move (weights_path));
261261}
262262
@@ -274,7 +274,7 @@ std::shared_ptr<ov::Model> InputModel::InputModelIRImpl::convert() {
274274 visitor.on_attribute (" net" , model);
275275 model->get_rt_info ()[" version" ] = int64_t (version);
276276 if (!m_weights_path.empty ())
277- model->get_rt_info ()[" __weights_path" ] = m_weights_path;
277+ model->get_rt_info ()[" __weights_path" ] = ov::util::path_to_string ( m_weights_path) ;
278278 parse_pre_process (m_root, m_weights, model);
279279
280280 return model;
0 commit comments