From 57875a51d9e33754149f54e14304ee4fb27e4519 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期三, 16 八月 2023 14:53:07 +0800
Subject: [PATCH] quant inference

---
 funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py b/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
index d596d29..c994036 100644
--- a/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
+++ b/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
@@ -235,8 +235,12 @@
             except:
                 raise "model_dir must be model_name in modelscope or local path downloaded from modelscope, but is {}".format(model_dir)
         
-        model_bb_file = os.path.join(model_dir, 'model.onnx')
-        model_eb_file = os.path.join(model_dir, 'model_eb.onnx')
+        if quantize:
+            model_bb_file = os.path.join(model_dir, 'model_quant.onnx')
+            model_eb_file = os.path.join(model_dir, 'model_eb_quant.onnx')
+        else:
+            model_bb_file = os.path.join(model_dir, 'model.onnx')
+            model_eb_file = os.path.join(model_dir, 'model_eb.onnx')
 
         token_list_file = os.path.join(model_dir, 'tokens.txt')
         self.vocab = {}

--
Gitblit v1.9.1