ollama - ✅(Solved) Fix 500 Internal Server Error: MLX runner failed - libmlxc.dylib not found [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15471Fetched 2026-04-11 06:12:46
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
closed ×1cross-referenced ×1labeled ×1subscribed ×1

When attempting to run the x/flux2-klein model, Ollama fails with an MLX initialization error stating that libmlxc.dylib cannot be found.

Error Message

Error: 500 Internal Server Error: mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)

Root Cause

When attempting to run the x/flux2-klein model, Ollama fails with an MLX initialization error stating that libmlxc.dylib cannot be found.

Fix Action

Fixed

PR fix notes

PR #30: Add image generation model and update provider to support it

Description (problem / solution / changelog)

<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. -->

Description of the Change

This PR adds support for Image generation model based on experimental feature of ollama please refer blog

This pull request adds support for image generation models to the Ollama provider integration. The most significant changes include the introduction of a new OllamaImageGenerationModel class, updates to model metadata detection to identify image generation capabilities, and enhancements to provider logic to instantiate the correct model type based on capabilities.

Image Generation Model Support:

  • Added a new OllamaImageGenerationModel class that implements image generation using the Ollama /api/generate endpoint, including prompt extraction, response parsing, and custom timeout handling.
  • Updated the provider logic in OllamaProvider to instantiate OllamaImageGenerationModel when a model supports image generation, based on its capabilities. [1] [2]

Model Metadata Detection:

  • Enhanced OllamaModelMetadataDirectory to detect image generation models by checking for the 'image' capability, and to construct appropriate ModelMetadata for such models with relevant options and output types. [1] [2] [3] [4]

Tooling and Static Analysis:

  • Updated phpstan.neon.dist to temporarily ignore the new OllamaImageGenerationModel.php file for static analysis, consistent with other files depending on unreleased WordPress core AI Client classes.

[!WARNING] Supported only on MacOS (because experiments are only avilable on MacOS) Tested with x/flux2-klein and x/z-image-turbo

Screenshots

  1. Verify the model is ready by visiting Settings->Ollama Settings

    <img width="1470" height="836" alt="Screenshot 2026-03-24 at 4 16 23 PM" src="https://github.com/user-attachments/assets/5a680349-01e8-4ab9-ba35-cc9dfe19a955" />
  2. Visit Media->Generate Image, Enter prompt

    <img width="1470" height="836" alt="Screenshot 2026-03-24 at 4 17 19 PM" src="https://github.com/user-attachments/assets/2d742da5-5849-4e90-a06f-15f7a06b85d0" />
  3. Generate Image

    <img width="1470" height="836" alt="Screenshot 2026-03-24 at 4 21 28 PM" src="https://github.com/user-attachments/assets/83afb232-db71-4b08-9c41-4ecaa297d99e" />
  4. Image in Media Gallery After saving it.

    <img width="1470" height="836" alt="Screenshot 2026-03-24 at 4 25 41 PM" src="https://github.com/user-attachments/assets/42f580f9-01ea-4a4a-8219-193239b47cee" />
<!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. -->

Closes #

How to test the Change

Download Model

ollama pull x/flux2-klein

Test Model

ollama run x/flux2-klein "a cat holding a sign that says hello world"

Test Curl

curl http://localhost:11434/api/generate -d '{
  "model": "x/flux2-klein",
  "prompt": "a cat holding a sign that says hello world",
  "stream": false
}'

Now you can try generate Image in WordPress

Changelog Entry

<!-- Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. -->

Added - support Image generation model

Credits

<!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. -->

Props @milindmore22

Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> <!-- wp-playground-preview:start --> <a href="https://playground.wordpress.net?blueprint-url=data:application/json,%7B%22steps%22%3A%5B%7B%22step%22%3A%22installPlugin%22%2C%22pluginZipFile%22%3A%7B%22resource%22%3A%22url%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2FFueled%2Fai-provider-for-ollama%2Freleases%2Fdownload%2Fci-artifacts%2Fpr-30-85b03cfdb9dff3191808848e7164de3196bc01f0.zip%22%7D%7D%5D%7D" target="_blank" rel="noopener noreferrer"> <img src="https://raw.githubusercontent.com/adamziel/playground-preview/refs/heads/trunk/assets/playground-preview-button.svg" alt="Open WordPress Playground Preview" width="220" height="57" /> </a> <!-- wp-playground-preview:end -->

Changed files

  • includes/Metadata/OllamaModelMetadataDirectory.php (modified, +44/-3)
  • includes/Models/OllamaImageGenerationModel.php (added, +217/-0)
  • includes/Provider/OllamaProvider.php (modified, +8/-0)
  • phpstan.neon.dist (modified, +1/-0)
  • tests/Integration/Metadata/OllamaModelMetadataDirectoryTest.php (modified, +103/-0)
  • tests/Integration/Models/OllamaImageGenerationModelTest.php (added, +332/-0)
  • tests/Integration/Provider/OllamaProviderTest.php (modified, +85/-1)

Code Example

Error: 500 Internal Server Error: mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)

---

time=2026-04-10T13:19:17.037+05:30 level=INFO source=routes.go:1752 msg="server config" env="map[HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:0 OLLAMA_DEBUG:INFO OLLAMA_DEBUG_LOG_REQUESTS:false OLLAMA_EDITOR: OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/Users/milind/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NO_CLOUD:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_REMOTES:[ollama.com] OLLAMA_SCHED_SPREAD:false http_proxy: https_proxy: no_proxy:]"
time=2026-04-10T13:19:17.038+05:30 level=INFO source=routes.go:1754 msg="Ollama cloud disabled: false"
time=2026-04-10T13:19:17.072+05:30 level=INFO source=images.go:499 msg="total blobs: 1553"
time=2026-04-10T13:19:17.075+05:30 level=INFO source=images.go:506 msg="total unused blobs removed: 0"
time=2026-04-10T13:19:17.076+05:30 level=INFO source=routes.go:1810 msg="Listening on 127.0.0.1:11434 (version 0.20.5)"
time=2026-04-10T13:19:17.076+05:30 level=INFO source=runner.go:67 msg="discovering available GPUs..."
time=2026-04-10T13:19:17.078+05:30 level=INFO source=server.go:444 msg="starting runner" cmd="/Applications/Ollama.app/Contents/Resources/ollama runner --ollama-engine --port 52713"
time=2026-04-10T13:19:17.231+05:30 level=INFO source=types.go:42 msg="inference compute" id=0 filter_id=0 library=Metal compute=0.0 name=Metal description="Apple M3" libdirs="" driver=0.0 pci_id="" type=discrete total="11.8 GiB" available="11.8 GiB"
time=2026-04-10T13:19:17.231+05:30 level=INFO source=routes.go:1860 msg="vram-based default context" total_vram="11.8 GiB" default_num_ctx=4096
[GIN] 2026/04/10 - 13:19:17 | 200 |     111.166µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:19:17 | 200 |      104.75µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:19:17 | 200 |   56.171209ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:19:17.556+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.2 GiB" free_swap="0 B"
time=2026-04-10T13:19:17.556+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:19:17.558+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=52720
time=2026-04-10T13:19:17.559+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:19:17.572+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=52720 mode=imagegen"
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:19:17.572+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:19:17.574+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:19:17.574+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=16585
[GIN] 2026/04/10 - 13:19:17 | 500 |    59.76075ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:30:42 | 200 |      54.625µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:30:42 | 200 |   14.755917ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:31:52 | 200 |       36.25µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:31:52 | 200 |   51.950833ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:31:52.923+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="7.1 GiB" free_swap="0 B"
time=2026-04-10T13:31:52.923+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:31:52.925+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53670
time=2026-04-10T13:31:52.926+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:31:52.939+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53670 mode=imagegen"
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:31:52.939+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:31:52.940+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:31:52.940+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=16785
[GIN] 2026/04/10 - 13:31:52 | 500 |     59.3245ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:32:21 | 200 |       35.75µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:32:21 | 200 |    9.848208ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:32:21 | 200 |  640.730416ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:21 | 200 |   169.29725ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |  149.339042ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |   23.185834ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |   12.321875ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:34 | 200 |      19.792µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:32:34 | 200 |    6.410292ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:32:34 | 200 |  298.730542ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |  189.360375ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |  260.477666ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |   39.996916ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |   19.488292ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:37:19 | 200 |      54.334µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:37:19 | 404 |   11.906208ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:37:20 | 200 |     1.010746s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2026/04/10 - 13:37:59 | 200 |          45µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:01 | 200 |  2.342140584s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2026/04/10 - 13:38:06 | 200 |      45.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:06 | 200 |    51.52325ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:07.041+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:07.041+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:07.044+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53791
time=2026-04-10T13:38:07.045+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:07.058+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:07.058+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53791 mode=imagegen"
time=2026-04-10T13:38:07.059+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:07.058+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:07.059+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:07.059+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:07.059+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=18983
[GIN] 2026/04/10 - 13:38:07 | 500 |     61.4045ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:38:08 | 200 |      58.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:08 | 200 |   55.581583ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:12.061+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:12.061+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:12.071+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53793
time=2026-04-10T13:38:12.076+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:12.109+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53793 mode=imagegen"
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:12.109+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:12.110+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:12.110+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=19000
[GIN] 2026/04/10 - 13:38:12 | 500 |  3.574317875s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:38:25 | 200 |      49.625µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:25 | 200 |   54.107125ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:26.005+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:26.005+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:26.007+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53795
time=2026-04-10T13:38:26.008+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:26.021+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53795 mode=imagegen"
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:26.021+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:26.022+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:26.022+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=19017
[GIN] 2026/04/10 - 13:38:26 | 500 |   58.961458ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:40:24 | 200 |      88.625µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:40:32 | 200 |      38.375µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:40:32 | 200 |      12.076ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:40:32 | 200 |   40.718708ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:32 | 200 |    338.9075ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:32 | 200 |  137.987458ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:33 | 200 |     194.342ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:33 | 200 |   13.212334ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:41:12 | 200 |      60.167µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:41:12 | 200 |     56.2805ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:41:12.940+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="5.8 GiB" free_swap="0 B"
time=2026-04-10T13:41:12.940+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:41:12.942+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53866
time=2026-04-10T13:41:12.943+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:12.955+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53866 mode=imagegen"
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:12.956+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:41:12.956+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:41:12.956+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=20060
[GIN] 2026/04/10 - 13:41:12 | 500 |   57.925375ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:41:51 | 200 |      33.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:41:51 | 200 |     55.2735ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:41:51.260+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="5.8 GiB" free_swap="0 B"
time=2026-04-10T13:41:51.260+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:41:51.262+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53893
time=2026-04-10T13:41:51.264+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:51.277+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53893 mode=imagegen"
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:51.277+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:41:51.278+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:41:51.278+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=20093
[GIN] 2026/04/10 - 13:41:51 | 500 |   59.807375ms |       127.0.0.1 | POST     "/api/generate"
RAW_BUFFERClick to expand / collapse

What is the issue?

Description

When attempting to run the x/flux2-klein model, Ollama fails with an MLX initialization error stating that libmlxc.dylib cannot be found.

Error Message

Error: 500 Internal Server Error: mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)

Steps to Reproduce

  1. Run the command: ollama run x/flux2-klein "A cat holding sign say Hello World"
  2. Error occurs immediately during model initialization

Expected Behavior

The model should either:

  • Initialize successfully if MLX dependencies are properly bundled/installed
  • Provide a clear error message with instructions on how to install MLX dependencies
  • Fall back to a non-MLX backend if available

Actual Behavior

The model fails to run with a 500 Internal Server Error, and the MLX library cannot be found.

Relevant log output

time=2026-04-10T13:19:17.037+05:30 level=INFO source=routes.go:1752 msg="server config" env="map[HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:0 OLLAMA_DEBUG:INFO OLLAMA_DEBUG_LOG_REQUESTS:false OLLAMA_EDITOR: OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/Users/milind/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NO_CLOUD:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_REMOTES:[ollama.com] OLLAMA_SCHED_SPREAD:false http_proxy: https_proxy: no_proxy:]"
time=2026-04-10T13:19:17.038+05:30 level=INFO source=routes.go:1754 msg="Ollama cloud disabled: false"
time=2026-04-10T13:19:17.072+05:30 level=INFO source=images.go:499 msg="total blobs: 1553"
time=2026-04-10T13:19:17.075+05:30 level=INFO source=images.go:506 msg="total unused blobs removed: 0"
time=2026-04-10T13:19:17.076+05:30 level=INFO source=routes.go:1810 msg="Listening on 127.0.0.1:11434 (version 0.20.5)"
time=2026-04-10T13:19:17.076+05:30 level=INFO source=runner.go:67 msg="discovering available GPUs..."
time=2026-04-10T13:19:17.078+05:30 level=INFO source=server.go:444 msg="starting runner" cmd="/Applications/Ollama.app/Contents/Resources/ollama runner --ollama-engine --port 52713"
time=2026-04-10T13:19:17.231+05:30 level=INFO source=types.go:42 msg="inference compute" id=0 filter_id=0 library=Metal compute=0.0 name=Metal description="Apple M3" libdirs="" driver=0.0 pci_id="" type=discrete total="11.8 GiB" available="11.8 GiB"
time=2026-04-10T13:19:17.231+05:30 level=INFO source=routes.go:1860 msg="vram-based default context" total_vram="11.8 GiB" default_num_ctx=4096
[GIN] 2026/04/10 - 13:19:17 | 200 |     111.166µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:19:17 | 200 |      104.75µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:19:17 | 200 |   56.171209ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:19:17.556+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.2 GiB" free_swap="0 B"
time=2026-04-10T13:19:17.556+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:19:17.558+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=52720
time=2026-04-10T13:19:17.559+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:19:17.572+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=52720 mode=imagegen"
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:19:17.572+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:19:17.572+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:19:17.574+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:19:17.574+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=16585
[GIN] 2026/04/10 - 13:19:17 | 500 |    59.76075ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:30:42 | 200 |      54.625µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:30:42 | 200 |   14.755917ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:31:52 | 200 |       36.25µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:31:52 | 200 |   51.950833ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:31:52.923+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="7.1 GiB" free_swap="0 B"
time=2026-04-10T13:31:52.923+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:31:52.925+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53670
time=2026-04-10T13:31:52.926+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:31:52.939+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53670 mode=imagegen"
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:31:52.939+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:31:52.939+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:31:52.940+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:31:52.940+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=16785
[GIN] 2026/04/10 - 13:31:52 | 500 |     59.3245ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:32:21 | 200 |       35.75µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:32:21 | 200 |    9.848208ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:32:21 | 200 |  640.730416ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:21 | 200 |   169.29725ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |  149.339042ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |   23.185834ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:22 | 200 |   12.321875ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:34 | 200 |      19.792µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:32:34 | 200 |    6.410292ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:32:34 | 200 |  298.730542ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |  189.360375ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |  260.477666ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |   39.996916ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:32:35 | 200 |   19.488292ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:37:19 | 200 |      54.334µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:37:19 | 404 |   11.906208ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:37:20 | 200 |     1.010746s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2026/04/10 - 13:37:59 | 200 |          45µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:01 | 200 |  2.342140584s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2026/04/10 - 13:38:06 | 200 |      45.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:06 | 200 |    51.52325ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:07.041+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:07.041+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:07.044+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53791
time=2026-04-10T13:38:07.045+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:07.058+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:07.058+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53791 mode=imagegen"
time=2026-04-10T13:38:07.059+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:07.058+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:07.059+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:07.059+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:07.059+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=18983
[GIN] 2026/04/10 - 13:38:07 | 500 |     61.4045ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:38:08 | 200 |      58.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:08 | 200 |   55.581583ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:12.061+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:12.061+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:12.071+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53793
time=2026-04-10T13:38:12.076+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:12.109+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53793 mode=imagegen"
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:12.109+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:12.109+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:12.110+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:12.110+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=19000
[GIN] 2026/04/10 - 13:38:12 | 500 |  3.574317875s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:38:25 | 200 |      49.625µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:38:25 | 200 |   54.107125ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:38:26.005+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="6.3 GiB" free_swap="0 B"
time=2026-04-10T13:38:26.005+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:38:26.007+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53795
time=2026-04-10T13:38:26.008+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:26.021+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53795 mode=imagegen"
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:38:26.021+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:38:26.021+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:38:26.022+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:38:26.022+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=19017
[GIN] 2026/04/10 - 13:38:26 | 500 |   58.961458ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:40:24 | 200 |      88.625µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:40:32 | 200 |      38.375µs |       127.0.0.1 | GET      "/api/version"
[GIN] 2026/04/10 - 13:40:32 | 200 |      12.076ms |       127.0.0.1 | GET      "/api/tags"
[GIN] 2026/04/10 - 13:40:32 | 200 |   40.718708ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:32 | 200 |    338.9075ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:32 | 200 |  137.987458ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:33 | 200 |     194.342ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:40:33 | 200 |   13.212334ms |       127.0.0.1 | POST     "/api/show"
[GIN] 2026/04/10 - 13:41:12 | 200 |      60.167µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:41:12 | 200 |     56.2805ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:41:12.940+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="5.8 GiB" free_swap="0 B"
time=2026-04-10T13:41:12.940+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:41:12.942+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53866
time=2026-04-10T13:41:12.943+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:12.955+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53866 mode=imagegen"
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:12.956+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:41:12.956+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:41:12.956+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:41:12.956+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=20060
[GIN] 2026/04/10 - 13:41:12 | 500 |   57.925375ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2026/04/10 - 13:41:51 | 200 |      33.917µs |       127.0.0.1 | HEAD     "/"
[GIN] 2026/04/10 - 13:41:51 | 200 |     55.2735ms |       127.0.0.1 | POST     "/api/show"
time=2026-04-10T13:41:51.260+05:30 level=INFO source=sched.go:484 msg="system memory" total="16.0 GiB" free="5.8 GiB" free_swap="0 B"
time=2026-04-10T13:41:51.260+05:30 level=INFO source=sched.go:491 msg="gpu memory" id=0 library=Metal available="11.3 GiB" free="11.8 GiB" minimum="512.0 MiB" overhead="0 B"
time=2026-04-10T13:41:51.262+05:30 level=INFO source=server.go:171 msg="starting mlx runner subprocess" model=x/flux2-klein:latest port=53893
time=2026-04-10T13:41:51.264+05:30 level=INFO source=sched.go:561 msg="loaded runners" count=1
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:51.277+05:30 level=INFO msg=\"starting mlx runner\" model=x/flux2-klein:latest port=53893 mode=imagegen"
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="time=2026-04-10T13:41:51.277+05:30 level=ERROR msg=\"unable to initialize MLX\" error=\"failed to initialize MLX: libmlxc.dylib not found\""
time=2026-04-10T13:41:51.277+05:30 level=WARN source=server.go:164 msg=mlx-runner msg="Error: failed to initialize MLX: libmlxc.dylib not found"
time=2026-04-10T13:41:51.278+05:30 level=ERROR source=sched.go:567 msg="error loading llama server" error="mlx runner failed: Error: failed to initialize MLX: libmlxc.dylib not found (exit: exit status 1)"
time=2026-04-10T13:41:51.278+05:30 level=INFO source=server.go:363 msg="stopping mlx runner subprocess" pid=20093
[GIN] 2026/04/10 - 13:41:51 | 500 |   59.807375ms |       127.0.0.1 | POST     "/api/generate"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.20.5

extent analysis

TL;DR

The most likely fix is to ensure that the libmlxc.dylib library is properly installed and configured on the system.

Guidance

  1. Verify library installation: Check if libmlxc.dylib is installed on the system and if its path is correctly configured.
  2. Check dependencies: Ensure that all dependencies required by the x/flux2-klein model are properly installed and configured.
  3. Environment variables: Verify that environment variables related to the model and library are correctly set.
  4. Library path configuration: Check if the path to libmlxc.dylib is correctly configured in the system's library path or in the model's configuration.

Example

No specific code example is provided as the issue seems to be related to library installation and configuration rather than code.

Notes

The issue might be specific to the macOS environment or the Apple GPU/CPU configuration. Further investigation into the system's configuration and library installation is required to resolve the issue.

Recommendation

Apply a workaround by manually installing or configuring the libmlxc.dylib library, or seek further assistance from the model or library developers to ensure correct installation and configuration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - ✅(Solved) Fix 500 Internal Server Error: MLX runner failed - libmlxc.dylib not found [1 pull requests, 1 participants]