ollama - 💡(How to fix) Fix Regression in running flux2-klein on iMac since v0.15.5 [1 comments, 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#14613Fetched 2026-04-08 00:33:49
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1labeled ×1

Error Message

$ ollama run --verbose x/flux2-klein:9b-bf16 Error: 500 Internal Server Error: mlx runner failed: Error: failed to create server: failed to load image model: insufficient memory for image generation: need 32 GB, have 30 GB (exit: exit status 1)

Code Example

$ ollama run --verbose x/flux2-klein:9b-bf16
Error: 500 Internal Server Error: mlx runner failed: Error: failed to create server: failed to load image model: insufficient memory for image generation: need 32 GB, have 30 GB (exit: exit status 1)
RAW_BUFFERClick to expand / collapse

What is the issue?

I am able to successfully run x/flux2-klein:9b-bf16 on my iMac M4 with 32 GB of memory when using ollama version 0.15.4 (see server-1.log). However, starting with ollama version 0.15.5 onwards (recently tested on 0.17.5 with the same result) it refuses to start due to "insufficient memory" (see server.log).

Relevant log output

$ ollama run --verbose x/flux2-klein:9b-bf16
Error: 500 Internal Server Error: mlx runner failed: Error: failed to create server: failed to load image model: insufficient memory for image generation: need 32 GB, have 30 GB (exit: exit status 1)

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.15.4

extent analysis

Fix Plan

To resolve the "insufficient memory" issue with ollama version 0.15.5 and later, we need to increase the memory allocation for the model.

Step-by-Step Solution

  • Check available memory: Verify that your system has sufficient memory to allocate to the model. In this case, the model requires 32 GB of memory.
  • Increase memory allocation: Update the ollama configuration to allocate more memory to the model. You can do this by setting the --memory flag when running the ollama run command.
  • Example command: Run the following command to allocate 32 GB of memory to the model:
ollama run --verbose --memory 32G x/flux2-klein:9b-bf16
  • Alternative solution: If increasing the memory allocation is not feasible, consider using a model that requires less memory or optimizing the model to reduce its memory footprint.

Verification

To verify that the fix worked, run the ollama run command with the increased memory allocation and check the output for any error messages related to insufficient memory. If the model runs successfully, it should indicate that the memory issue has been resolved.

Extra Tips

  • Make sure to monitor your system's memory usage when running the model to avoid over-allocating memory and causing other system issues.
  • Consider using a more efficient model or optimizing your existing model to reduce its memory requirements.

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