{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-10-30T05:49:48.963582Z", "iopub.status.busy": "2023-10-30T05:49:48.962849Z", "iopub.status.idle": "2023-10-30T05:50:11.833090Z", "shell.execute_reply": "2023-10-30T05:50:11.832195Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n", "Loading G2P model... Done!\n" ] } ], "source": [ "FASTSPEECH2_HOME = '/Fastspeech2_HS'\n", "ONNX_MODELS_HOME = '/onnx_models'\n", "import os\n", "import json\n", "import yaml\n", "import torch\n", "import shutil\n", "!mkdir -p $ONNX_MODELS_HOME/vocoders\n", "from sys import path\n", "os.chdir(FASTSPEECH2_HOME)\n", "path.append(\"hifigan\")\n", "from env import AttrDict\n", "from pathlib import Path\n", "from models import Generator\n", "from espnet_onnx.export import TTSModelExport\n", "from espnet2.bin.tts_inference import Text2Speech\n", "from text_preprocess_for_inference import TTSDurAlignPreprocessor, CharTextPreprocessor, TTSPreprocessor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Saving FastSpeech2 and HifiGAN to ONNX" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2023-10-30T05:50:11.836793Z", "iopub.status.busy": "2023-10-30T05:50:11.836609Z", "iopub.status.idle": "2023-10-30T05:52:53.727897Z", "shell.execute_reply": "2023-10-30T05:52:53.726516Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Removing weight norm...\n", "saving fastspeech2 onnx for male, assamese...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/_internal/jit_utils.py:306: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_node_shape_type_inference(node, params_dict, opset_version)\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:689: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:1186: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "saving vocoder onnx for male-aryan...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:2033: UserWarning: No names were found for specified dynamic axes of provided input.Automatically generated names will be applied to each dynamic axes of input input\n", " warnings.warn(\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:2033: UserWarning: No names were found for specified dynamic axes of provided input.Automatically generated names will be applied to each dynamic axes of input output\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, bengali...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/_internal/jit_utils.py:306: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_node_shape_type_inference(node, params_dict, opset_version)\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:689: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:1186: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, bodo...\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, english...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, gujarati...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, hindi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, kannada...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "saving vocoder onnx for male-dravidian...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, malayalam...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, manipuri...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, marathi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, odia...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, punjabi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, rajasthani...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, tamil...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, telugu...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for male, urdu...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, assamese...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "saving vocoder onnx for female-aryan...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, bengali...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, bodo...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, english...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, gujarati...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, hindi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, kannada...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "saving vocoder onnx for female-dravidian...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, malayalam...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, manipuri...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, marathi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, odia...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, punjabi...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, rajasthani...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, tamil...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, telugu...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/_internal/jit_utils.py:306: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_node_shape_type_inference(node, params_dict, opset_version)\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:689: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n", "/home/builder/conda/envs/text2phone/lib/python3.10/site-packages/torch/onnx/utils.py:1186: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at ../torch/csrc/jit/passes/onnx/constant_fold.cpp:179.)\n", " _C._jit_pass_onnx_graph_shape_type_inference(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Removing weight norm...\n", "saving fastspeech2 onnx for female, urdu...\n", "============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============\n", "verbose: False, log level: Level.ERROR\n", "======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:Please consider to run pre-processing before quantization. Refer to example: https://github.com/microsoft/onnxruntime-inference-examples/blob/main/quantization/image_classification/cpu/ReadMe.md \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/encoder/encoders/encoders.3/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.0/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.1/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.2/self_attn/MatMul_1]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul]\n", "Ignore MatMul due to non constant B: /[/decoder/encoders/encoders.3/self_attn/MatMul_1]\n" ] } ], "source": [ "def convert_fastspeech2_model(language, gender):\n", " model = load_fastspeech2_model_pytorch(language, gender, 'cpu')\n", " os.chdir(ONNX_MODELS_HOME);TTSModelExport('text2phone').export(model, f'{language}-{gender}-ort', quantize=True);os.chdir(FASTSPEECH2_HOME)\n", " return model\n", "def load_fastspeech2_model_pytorch(language, gender, device):\n", " with open(f\"{language}/{gender}/model/config.yaml\", \"r\") as file: config = yaml.safe_load(file)\n", " current_working_directory, feat, pitch, energy = os.getcwd(), \"model/feats_stats.npz\", \"model/pitch_stats.npz\", \"model/energy_stats.npz\"\n", " feat_path, pitch_path, energy_path = os.path.join(current_working_directory, language, gender, feat), os.path.join(current_working_directory, language, gender, pitch), os.path.join(current_working_directory ,language, gender, energy)\n", " config[\"normalize_conf\"][\"stats_file\"], config[\"pitch_normalize_conf\"][\"stats_file\"], config[\"energy_normalize_conf\"][\"stats_file\"] = feat_path, pitch_path, energy_path\n", " with open(f\"{language}/{gender}/model/config.yaml\", \"w\") as file: yaml.dump(config, file)\n", " tts_model, tts_config = f\"{language}/{gender}/model/model.pth\", f\"{language}/{gender}/model/config.yaml\"\n", " return Text2Speech(train_config=tts_config, model_file=tts_model, device=device)\n", "def load_hifigan_vocoder_pytorch(gender, family, device):\n", " vocoder_config, vocoder_generator = f\"vocoder/{gender}/{family}/hifigan/config.json\", f\"vocoder/{gender}/{family}/hifigan/generator\"\n", " with open(vocoder_config, 'r') as f: h = AttrDict(json.load(f))\n", " torch.manual_seed(h.seed)\n", " generator, state_dict_g = Generator(h).to(torch.device(device)), torch.load(vocoder_generator, torch.device(device))\n", " generator.load_state_dict(state_dict_g['generator'])\n", " generator.eval()\n", " generator.remove_weight_norm()\n", " return generator\n", "for gender in ['male', 'female']:\n", " for language, family in [('assamese', 'aryan'), ('bengali', 'aryan'), ('bodo', 'aryan'), ('english', 'aryan'), ('gujarati', 'aryan'), ('hindi', 'aryan'), ('kannada', 'dravidian'), ('malayalam', 'dravidian'), ('manipuri', 'aryan'), ('marathi', 'aryan'), ('odia', 'aryan'), ('punjabi', 'aryan'), ('rajasthani', 'aryan'), ('tamil', 'dravidian'), ('telugu', 'dravidian'), ('urdu', 'aryan')]:\n", " vocoder = load_hifigan_vocoder_pytorch(gender, family, 'cpu')\n", " print(f'saving fastspeech2 onnx for {gender}, {language}...')\n", " if language == \"urdu\" or language == \"punjabi\": preprocessor = CharTextPreprocessor()\n", " elif language == \"english\": preprocessor = TTSPreprocessor()\n", " else: preprocessor = TTSDurAlignPreprocessor()\n", " sample_text = \" \".join(preprocessor.preprocess(\"this is a sentence\", language, gender)[0])\n", " try:\n", " model_out = (convert_fastspeech2_model(language, gender)(sample_text)[\"feat_gen_denorm\"].T.unsqueeze(0) * 2.3262).to('cpu')\n", " if not os.path.exists(f'{ONNX_MODELS_HOME}/vocoders/{gender}-{family}-vocoder.onnx'):\n", " print(f'saving vocoder onnx for {gender}-{family}...')\n", " torch.onnx.export(vocoder, model_out, f'{ONNX_MODELS_HOME}/vocoders/{gender}-{family}-vocoder.onnx', input_names=['input'], output_names=['output'], dynamic_axes={'input': [0, 2], 'output': [0]})\n", " except FileNotFoundError: pass\n", "for f in Path('~/.cache/espnet_onnx').rglob('full'): shutil.rmtree(f)\n", "!mv ~/.cache/espnet_onnx/tag_config.yaml $ONNX_MODELS_HOME/text2phone" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.6" } }, "nbformat": 4, "nbformat_minor": 2 }