[🐞 BUG] Error occurred while enabling the model
Describe the bug
When I try to enable the model, I receive the following error:
Failed to build the model execution plan using a model architecture file '/Users/pi/Library/Caches/FluidAudio/CompiledNemotronModels/encoder-842ccec78631ca4e/encoder_ane_1781622167444.mlmodelc/model.mil' with error code: -14.
To Reproduce
Steps to reproduce the behavior:
- Open FluidAudio.
- Navigate to the Models settings page.
- Download and enable the Nemotron model.
- Wait for the model initialization process.
- An error message appears and the model cannot be enabled.
Expected behavior
The model should be enabled successfully and become available for use.
Screenshots
Environment
- macOS Version: 15.7.3 (24G419) Macbook air m4 32G
- App Version: FluidVoice v1.5.15
- Architecture: Apple Silicon
Additional context
I am using a MacBook Air M4. The issue occurs immediately when attempting to enable the Nemotron model after downloading it. Re-downloading the model and restarting the application did not resolve the issue.
Crash Logs
The application did not crash, but the following error was shown:
Failed to build the model execution plan using a model architecture file '/Users/pi/Library/Caches/FluidAudio/CompiledNemotronModels/encoder-842ccec78631ca4e/encoder_ane_1781622167444.mlmodelc/model.mil' with error code: -14.
Open terminal and run
rm -rf /Users/pi/Library/Caches/FluidAudio/CompiledNemotronModels
Wanna delete this and see if it works?
Implemented in https://github.com/altic-dev/FluidVoice/pull/456 - clears the corrupt FluidAudio CompiledNemotronModels cache before the GPU fallback retry so CoreML recompiles fresh, with an actionable error if it still fails.
Reproduced + fix verified
Repro — forced the corrupt compiled-cache failure class deterministically:
- With the Nemotron model already downloaded, corrupted the ANE-compiled encoder at
~/Library/Caches/FluidAudio/CompiledNemotronModels/encoder-*/encoder_ane_*.mlmodelc/model.mil(overwrote with garbage bytes). - Re-selected Nemotron to force a fresh model load.
The load fails on the bad model.mil and the app auto-recovers with no user-facing error:
[ERROR] ASRService: First prepare attempt for Nemotron … failed
[WARN] CoreML … encoder_ane_….mlmodelc/model.mil … Error parsing MIL model …
→ Attempting a single recovery by clearing provider cache.
[INFO] ASRService: Clearing provider cache before retry
[INFO] Nemotron: loaded CoreML models with cpuAndNeuralEngine
[INFO] ASRService: Provider prepared successfully after cache-clear retry
The line item that fixes this
Primary recovery — on the first prepare failure, wipe the compiled-model cache and do one strict retry (re-downloads/recompiles clean):
- https://github.com/altic-dev/FluidVoice/blob/b0bb11f7ad64736a967d5342a7cde6d64e116678/Sources/Fluid/Services/ASRService.swift#L3196 —
try await provider.clearCache()(retry at #L3207)
Dedicated -14 net — if only the ANE execution-plan build fails, fall off the Neural Engine onto GPU:
- https://github.com/altic-dev/FluidVoice/blob/b0bb11f7ad64736a967d5342a7cde6d64e116678/Sources/Fluid/Services/NemotronProvider.swift#L179 — retry with
.cpuAndGPU, guarded byshouldRetryWithoutNeuralEnginematchingerror.code == -14/ "model execution plan" (#L554).
Caveat
I induced the corrupt-cache failure as CoreML Code 71 (MIL parse error); the exact -14 (a valid-but-ANE-incompatible plan build, specific to the reported M4 / macOS 15.7.3) was verified by code inspection of the -14 branch rather than triggered live. The outer cache-clear recovery covers both classes.
No code change required — both safety nets are already on main.
Fixing commit
The -14 (ANE execution-plan failure) is directly addressed by:
fix(nemotron): fall back to cpuAndGPU when ANE load fails
https://github.com/altic-dev/FluidVoice/commit/1235e4309e4814f494568b773a0dafebefbbab92
Core ML model load on the Neural Engine can fail with error code -14 on some Macs. Retry with
.cpuAndGPUwhen that happens, detecting the retry via typed NSError code walking underlying/multiple errors first, with localized string matching as a secondary signal.
- Merged via PR #389.
- Landed 2026-06-17, ~16h after this issue was filed — a direct response to it.
- On
main:Sources/Fluid/Services/NemotronProvider.swiftretries with.cpuAndGPU(guarded byshouldRetryWithoutNeuralEngine, which matcheserror.code == -14/ "model execution plan").
Note: this is the fix for the genuine ANE -14. The separate corrupt-cache clear-and-retry path (ASRService) only helps when the compiled cache is corrupt — it can't resolve a valid-but-ANE-incompatible plan, which is why the .cpuAndGPU fallback was the actual fix here.