You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Details:
- Writing to stringstream caused additional copy
- I've implemented custom buffer that wraps interactions with python
memory without extra copies
- I used ControlNet for measurement of memory consumption and and I was
able to reduce memory consumption by 1.6 times for this model.
```
def test1():
core = ov.Core()
model = core.read_model(xml_path)
compiled_model = core.compile_model(model, device_name="CPU")
user_stream = io.BytesIO()
compiled_model.export_model(user_stream)
```

```
def test2():
core = ov.Core()
model = core.read_model(xml_path)
compiled_model = core.compile_model(model, device_name="CPU")
user_stream = compiled_model.export_model()
```

- For `read_model` and `compile_model` charts didn't show significant improvements as these changes relate to `xml` file, which is ~6 Mb
### Tickets:
- [CVS-160767](https://jira.devtools.intel.com/browse/CVS-160767)
0 commit comments