]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
models : use absolute paths for the converted model (#1356)
authorbobqianic <redacted>
Fri, 3 Nov 2023 08:44:27 +0000 (08:44 +0000)
committerGitHub <redacted>
Fri, 3 Nov 2023 08:44:27 +0000 (10:44 +0200)
models/convert-whisper-to-openvino.py

index 31cf29abdf599950112f6bc60b681875addb9186..cdee571b11feaa7941f7b7218305c46b0202eb3f 100644 (file)
@@ -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):