Skip to content

Commit

Permalink
fix parler tts inference on gpu (#2205)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Jul 17, 2024
1 parent 14597ae commit 3961b06
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions notebooks/parler-tts-text-to-speech/parler-tts-text-to-speech.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "7ff975e6-b25d-4366-adad-4eeda48a9f37",
"metadata": {},
Expand Down Expand Up @@ -30,7 +29,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "27608f06-e493-436f-9319-e6a181b66ea4",
"metadata": {},
Expand All @@ -55,7 +53,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "592145b2-12b6-4606-9447-cf55048f0548",
"metadata": {},
Expand Down Expand Up @@ -127,7 +124,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ba1f8bc5-406b-469c-90db-1f2e620f37e4",
"metadata": {},
Expand Down Expand Up @@ -164,7 +160,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d6c3ebe5-a310-43fe-bf12-c53487f0cefe",
"metadata": {},
Expand Down Expand Up @@ -193,7 +188,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fb981bec-24b7-46ad-a7b2-13c1f3e45092",
"metadata": {},
Expand Down Expand Up @@ -285,7 +279,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3ba48d0c-4e19-4829-84d3-619d11028a19",
"metadata": {},
Expand Down Expand Up @@ -333,7 +326,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fc1777b2-c1fd-45be-930a-22df04d8cbd7",
"metadata": {},
Expand All @@ -356,7 +348,10 @@
"\n",
"class TextEncoderModelWrapper(torch.nn.Module):\n",
" def __init__(self, encoder_ir_path, config):\n",
" self.encoder = core.compile_model(encoder_ir_path, device.value)\n",
" ov_config = {}\n",
" if \"GPU\" in device.value:\n",
" ov_config = {\"INFERENCE_PRECISION_HINT\": \"f32\"}\n",
" self.encoder = core.compile_model(encoder_ir_path, device.value, ov_config)\n",
" self.config = config\n",
" self.dtype = self.config.torch_dtype\n",
"\n",
Expand Down Expand Up @@ -401,7 +396,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "5e4b6148-ce3b-4a8c-85a7-b9a66610bb5d",
"metadata": {},
Expand Down Expand Up @@ -466,7 +460,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7978bc2e-077d-46cc-acd3-df4f90038730",
"metadata": {},
Expand Down Expand Up @@ -569,7 +562,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.8.10"
},
"openvino_notebooks": {
"imageUrl": "https://images.squarespace-cdn.com/content/v1/657816dfbefe0533e8a69d9a/30c96e25-acc5-4019-acdd-648da6142c4c/architecture_v3.png?raw=true",
Expand All @@ -586,6 +579,13 @@
"Text-to-Speech"
]
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3961b06

Please sign in to comment.