From: bobqianic Date: Fri, 3 Nov 2023 08:44:27 +0000 (+0000) Subject: models : use absolute paths for the converted model (#1356) X-Git-Tag: upstream/1.7.4~1292 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8a2bee67171f43f9ba7193eb7f1b68998751417b;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp models : use absolute paths for the converted model (#1356) --- diff --git a/models/convert-whisper-to-openvino.py b/models/convert-whisper-to-openvino.py index 31cf29ab..cdee571b 100644 --- a/models/convert-whisper-to-openvino.py +++ b/models/convert-whisper-to-openvino.py @@ -29,7 +29,7 @@ def convert_encoder(hparams, encoder, mname): # use model optimizer to convert onnx to OpenVINO IR format encoder_model = mo.convert_model(onnx_path, compress_to_fp16=True) - serialize(encoder_model, xml_path='ggml-' + mname + '-encoder-openvino.xml') + serialize(encoder_model, xml_path=os.path.join(os.path.dirname(__file__),"ggml-" + mname + "-encoder-openvino.xml")) #cleanup if os.path.isdir(onnx_folder):