Skip to content

Commit

Permalink
multiple bugfixes (#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Oct 30, 2023
1 parent e6cc928 commit 5f67fd5
Show file tree
Hide file tree
Showing 6 changed files with 414 additions and 198 deletions.
4 changes: 2 additions & 2 deletions notebooks/109-performance-tricks/109-latency-tricks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
],
"source": [
"%pip install -q \"openvino>=2023.1.0\" seaborn \"ultralytics<=8.178.0\" onnx"
"%pip install -q \"openvino>=2023.1.0\" seaborn \"ultralytics<=8.0.178\" onnx"
]
},
{
Expand Down Expand Up @@ -872,7 +872,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
27 changes: 9 additions & 18 deletions notebooks/109-performance-tricks/109-throughput-tricks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -61,7 +60,7 @@
},
"outputs": [],
"source": [
"%pip install -q \"openvino>=2023.1.0\" seaborn ultralytics onnx"
"%pip install -q \"openvino>=2023.1.0\" \"ultralytics<=8.0.178\" seaborn ultralytics onnx"
]
},
{
Expand Down Expand Up @@ -95,7 +94,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -169,7 +167,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -227,7 +224,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -278,7 +274,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -343,7 +338,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -462,7 +456,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -522,7 +515,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -605,7 +597,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -691,7 +682,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -742,7 +732,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -797,7 +786,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -855,7 +843,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -910,7 +897,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -963,7 +949,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -1046,7 +1031,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -1074,7 +1058,14 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@
"source": [
"## Convert model to OpenVINO Intermediate Representation (IR) format. [$\\Uparrow$](#Table-of-content:)\n",
"\n",
"![conversion_path](https://user-images.githubusercontent.com/29454499/208048580-8264e54c-151c-43ef-9e25-1302cd0dd7a2.png)\n",
"\n",
"For best results with OpenVINO, it is recommended to convert the model to OpenVINO IR format. OpenVINO supports PyTorch via Model conversion API. . \n",
"For best results with OpenVINO, it is recommended to convert the model to OpenVINO IR format. OpenVINO supports PyTorch via Model conversion API.\n",
"To convert the PyTorch model to OpenVINO IR format we will use `ov.convert_model` of [model conversion API](https://docs.openvino.ai/2023.0/openvino_docs_model_processing_introduction.html). The `ov.convert_model` Python function returns an OpenVINO Model object ready to load on the device and start making predictions. We can save it on disk for the next usage with `ov.save_model`.\n"
]
},
Expand Down Expand Up @@ -448,7 +446,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
Expand All @@ -457,38 +455,7 @@
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"3e4b0eb9ddb44b208cba45b5dd46a48e": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"b149325610eb40aea03db6d262a3568a": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DropdownModel",
"state": {
"_options_labels": [
"CPU",
"GPU",
"AUTO"
],
"description": "Device:",
"index": 2,
"layout": "IPY_MODEL_3e4b0eb9ddb44b208cba45b5dd46a48e",
"style": "IPY_MODEL_d7b1a9acaf2948118654ff0f8a1835c1"
}
},
"d7b1a9acaf2948118654ff0f8a1835c1": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DescriptionStyleModel",
"state": {
"description_width": ""
}
}
},
"state": {},
"version_major": 2,
"version_minor": 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from transformers import CLIPTokenizer
from diffusers.pipeline_utils import DiffusionPipeline
from diffusers.schedulers import DDIMScheduler, LMSDiscreteScheduler, PNDMScheduler
from openvino as ov
import openvino as ov


def scale_fit_to_window(dst_width:int, dst_height:int, image_width:int, image_height:int):
Expand Down

0 comments on commit 5f67fd5

Please sign in to comment.