Skip to content

Commit cff8868

Browse files
authored
coreml : always convert to "neuralnetwork" (#2770)
1 parent 90e3c5f commit cff8868

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/convert-whisper-to-coreml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def convert_encoder(hparams, model, quantize=False):
245245

246246
model = ct.convert(
247247
traced_model,
248-
convert_to=None if quantize else "mlprogram", # convert will fail if weights are quantized, not sure why
248+
convert_to="neuralnetwork",
249249
inputs=[ct.TensorType(name="logmel_data", shape=input_shape)],
250250
outputs=[ct.TensorType(name="output")],
251251
compute_units=ct.ComputeUnit.ALL
@@ -268,7 +268,7 @@ def convert_decoder(hparams, model, quantize=False):
268268

269269
model = ct.convert(
270270
traced_model,
271-
convert_to=None if quantize else "mlprogram", # convert will fail if weights are quantized, not sure why
271+
convert_to="neuralnetwork",
272272
inputs=[
273273
ct.TensorType(name="token_data", shape=tokens_shape, dtype=int),
274274
ct.TensorType(name="audio_data", shape=audio_shape)

0 commit comments

Comments
 (0)