diff --git a/cosyvoice/bin/export_jit.py b/cosyvoice/bin/export_jit.py index 4733581..1e89005 100644 --- a/cosyvoice/bin/export_jit.py +++ b/cosyvoice/bin/export_jit.py @@ -61,7 +61,8 @@ def main(): model = CosyVoice(args.model_dir) except Exception: try: - model = CosyVoice2(args.model_dir) + # NOTE set use_flow_cache=True when export jit for cache inference + model = CosyVoice2(args.model_dir, use_flow_cache=True) except Exception: raise TypeError('no valid model_type!') diff --git a/cosyvoice/bin/export_onnx.py b/cosyvoice/bin/export_onnx.py index f03dafb..310f2c1 100644 --- a/cosyvoice/bin/export_onnx.py +++ b/cosyvoice/bin/export_onnx.py @@ -62,7 +62,8 @@ def main(): model = CosyVoice(args.model_dir) except Exception: try: - model = CosyVoice2(args.model_dir) + # NOTE set use_flow_cache=True when export jit for cache inference + model = CosyVoice2(args.model_dir, use_flow_cache=True) except Exception: raise TypeError('no valid model_type!')