mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-04-05 04:08:58 +08:00
15 lines
620 B
Python
15 lines
620 B
Python
import argparse
|
|
from infer.modules.onnx.export import export_onnx as eo
|
|
|
|
# Usage Example:
|
|
# python tools/export_onnx.py --input_model ~/models/my-model.pth --output_model ~/models/my-model.onnx
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--input_model", type=str, help="input model path", default="Shiroha/shiroha.pth")
|
|
parser.add_argument("--output_model", type=str, help="output Onnx model path", default="model.onnx")
|
|
args = parser.parse_args()
|
|
|
|
ModelPath = args.input_model
|
|
ExportedPath = args.output_model
|
|
eo(ModelPath, ExportedPath)
|