ZillaRU / EmotiVoice-TPU

Text2speech & tone color conversion demo running on SG2300x 结合openvoice和emotivoice的TTS+即时克隆
Apache License 2.0
18 stars 2 forks source link

how to convert models to bmodel? #4

Open zhangw864680355 opened 1 month ago

zhangw864680355 commented 1 month ago

How to convert models to bmodel? Can you provide a reference example? Thanks.

ZillaRU commented 1 month ago

To convert a pytorch model to its corresponding bmodel, you need first convert it to onnx/jit model, and then convert the onnx/jit model to a bmodel.

You can refer to the example in XInstructBLIP-TPU (trace_others.py for pth model -> onnx/jit model, compile_others.py for onnx/jit model -> bmodel) and docs in tpu-mlir quickstart.