Fix: support infer 2.2 models (#244)
* Fix: support infer 2.2 models * Fix imports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,7 @@ class OnnxInferenceSession:
|
||||
tone = np.expand_dims(tone, 0)
|
||||
if language.ndim == 1:
|
||||
language = np.expand_dims(language, 0)
|
||||
assert(seq.ndim == 2,tone.ndim == 2,language.ndim == 2)
|
||||
assert (seq.ndim == 2, tone.ndim == 2, language.ndim == 2)
|
||||
g = self.emb_g.run(
|
||||
None,
|
||||
{
|
||||
@@ -82,7 +82,7 @@ class OnnxInferenceSession:
|
||||
"bert_2": bert_en.astype(np.float32),
|
||||
"g": g.astype(np.float32),
|
||||
"vqidx": vqidx.astype(np.int64),
|
||||
"sid": sid.astype(np.int64)
|
||||
"sid": sid.astype(np.int64),
|
||||
},
|
||||
)
|
||||
x, m_p, logs_p, x_mask = enc_rtn[0], enc_rtn[1], enc_rtn[2], enc_rtn[3]
|
||||
|
||||
Reference in New Issue
Block a user