[GH-ISSUE #13861] Flux2-Klein:4b won't create images | Error: 500 Internal Server Error: image runner exited unexpectedly: exit status 255 #34834

Closed
opened 2026-04-22 18:45:19 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @rebeccamice2002 on GitHub (Jan 23, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/13861

What is the issue?

when i try to create any images, server giving me the error code 500 like this;

Error: 500 Internal Server Error: image runner exited unexpectedly: exit status 255

Relevant log output

$ ollama run x/flux2-klein "a cat holding a sign that says hello world"
pulling manifest 
writing manifest 
success 

Error: 500 Internal Server Error: image runner exited unexpectedly: exit status 255

and here is the server ouput

[GIN] 2026/01/23 - 16:11:48 | 500 |  6.534885666s |       127.0.0.1 | POST     "/api/generate"
time=2026-01-23T16:16:56.454+03:00 level=INFO source=server.go:149 msg="starting ollama-mlx image runner subprocess" exe=/usr/local/bin/ollama-mlx model=x/flux2-klein:4b port=39087
time=2026-01-23T16:16:56.539+03:00 level=INFO source=server.go:134 msg=image-runner msg="MLX error: cudaMallocManaged(&data_, small_pool_size) failed: CUDA driver version is insufficient for CUDA runtime version at /go/src/github.com/ollama/ollama/build/_deps/mlx-c-src/mlx/c/random.cpp:143"
time=2026-01-23T16:16:56.571+03:00 level=INFO source=server.go:320 msg="stopping image runner subprocess" pid=302714

OS

Linux

GPU

Intel, Nvidia

CPU

Intel

Ollama version

0.14.2

Originally created by @rebeccamice2002 on GitHub (Jan 23, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/13861 ### What is the issue? when i try to create any images, server giving me the error code 500 like this; Error: 500 Internal Server Error: image runner exited unexpectedly: exit status 255 ### Relevant log output ```shell $ ollama run x/flux2-klein "a cat holding a sign that says hello world" pulling manifest writing manifest success Error: 500 Internal Server Error: image runner exited unexpectedly: exit status 255 ``` and here is the server ouput ```shell [GIN] 2026/01/23 - 16:11:48 | 500 | 6.534885666s | 127.0.0.1 | POST "/api/generate" time=2026-01-23T16:16:56.454+03:00 level=INFO source=server.go:149 msg="starting ollama-mlx image runner subprocess" exe=/usr/local/bin/ollama-mlx model=x/flux2-klein:4b port=39087 time=2026-01-23T16:16:56.539+03:00 level=INFO source=server.go:134 msg=image-runner msg="MLX error: cudaMallocManaged(&data_, small_pool_size) failed: CUDA driver version is insufficient for CUDA runtime version at /go/src/github.com/ollama/ollama/build/_deps/mlx-c-src/mlx/c/random.cpp:143" time=2026-01-23T16:16:56.571+03:00 level=INFO source=server.go:320 msg="stopping image runner subprocess" pid=302714 ``` ### OS Linux ### GPU Intel, Nvidia ### CPU Intel ### Ollama version 0.14.2
GiteaMirror added the bug label 2026-04-22 18:45:19 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 23, 2026):

CUDA driver version is insufficient for CUDA runtime version

Output of nvidia-smi?

<!-- gh-comment-id:3790324122 --> @rick-github commented on GitHub (Jan 23, 2026): ``` CUDA driver version is insufficient for CUDA runtime version ``` Output of `nvidia-smi`?
Author
Owner

@rebeccamice2002 commented on GitHub (Jan 23, 2026):

CUDA driver version is insufficient for CUDA runtime version

Output of nvidia-smi?

i actually cant use cuda with ollama bc i have 1050 ti which is an unsupported version of nvidia on ollamas cuda support

<!-- gh-comment-id:3790525442 --> @rebeccamice2002 commented on GitHub (Jan 23, 2026): > ``` > CUDA driver version is insufficient for CUDA runtime version > ``` > > Output of `nvidia-smi`? i actually cant use cuda with ollama bc i have 1050 ti which is an unsupported version of nvidia on ollamas cuda support
Author
Owner

@Antipula commented on GitHub (Jan 23, 2026):

MLX CUDA 12

<!-- gh-comment-id:3790604238 --> @Antipula commented on GitHub (Jan 23, 2026): MLX CUDA 12
Author
Owner

@stronk7 commented on GitHub (Jan 23, 2026):

Isn't the experimental image generation available only for Mac? I did read recently that the Windows / Linux compatibility was coming later.

I maybe wrong, but...

Ciao :-)

<!-- gh-comment-id:3791600590 --> @stronk7 commented on GitHub (Jan 23, 2026): Isn't the experimental image generation available only for Mac? I did read recently that the Windows / Linux compatibility was coming later. I maybe wrong, but... Ciao :-)
Author
Owner

@rick-github commented on GitHub (Jan 23, 2026):

The release requires a bit of a fix up but can be made to work on Linux.

Image
<!-- gh-comment-id:3791722759 --> @rick-github commented on GitHub (Jan 23, 2026): The release requires a bit of a fix up but can be made to work on Linux. <img width="1020" height="1015" alt="Image" src="https://github.com/user-attachments/assets/fdc8c6b6-ad7e-4ec6-8515-824c1d99ab22" />
Author
Owner

@rebeccamice2002 commented on GitHub (Jan 23, 2026):

Isn't the experimental image generation available only for Mac? I did read recently that the Windows / Linux compatibility was coming later.

I maybe wrong, but...

Ciao :-)

oh.. i checked again and you are right. thank you for reminding that part.

<!-- gh-comment-id:3792621554 --> @rebeccamice2002 commented on GitHub (Jan 23, 2026): > Isn't the experimental image generation available only for Mac? I did read recently that the Windows / Linux compatibility was coming later. > > I maybe wrong, but... > > Ciao :-) oh.. i checked again and you are right. thank you for reminding that part.
Author
Owner

@madmax772 commented on GitHub (Jan 26, 2026):

[Incase this is helpful to speed up Linux support] I am hitting the same issue on Linux (Ubuntu) using an NVIDIA RTX 2000E Ada (16GB). I stopped all other services and verified I had ~16GB VRAM free before running the generation. The model loads successfully, but crashes immediately when encoding prompt with a dimension mismatch error in the MLX adapter. I can see Ollama "entering low vram mode" , but I don't think this is the culprit.

Logs:
Jan 26 08:18:17 ubuntu-desktop ollama[1283354]: time=2026-01-26T08:18:17.157-08:00 level=INFO source=server.go:129 msg=image-runner msg=" Encoding prompt... MLX error: [matmul] Last dimension of first input with shape (1,512,4096) must match second to last dimension of second input with shape (12288,4096). at /go/src/github.com/ollama/ollama/build/_deps/mlx-c-src/mlx/c/ops.cpp:1943"

Environment:
OS: Ubuntu Linux
CPU: AMD
GPU: NVIDIA RTX 2000E Ada (16GB)
Ollama Version: 0.15.1
Model: x/flux2-klein:9b

<!-- gh-comment-id:3800550328 --> @madmax772 commented on GitHub (Jan 26, 2026): [Incase this is helpful to speed up Linux support] I am hitting the same issue on Linux (Ubuntu) using an NVIDIA RTX 2000E Ada (16GB). I stopped all other services and verified I had ~16GB VRAM free before running the generation. The model loads successfully, but crashes immediately when encoding prompt with a dimension mismatch error in the MLX adapter. I can see Ollama "entering low vram mode" , but I don't think this is the culprit. **Logs:** `Jan 26 08:18:17 ubuntu-desktop ollama[1283354]: time=2026-01-26T08:18:17.157-08:00 level=INFO source=server.go:129 msg=image-runner msg=" Encoding prompt... MLX error: [matmul] Last dimension of first input with shape (1,512,4096) must match second to last dimension of second input with shape (12288,4096). at /go/src/github.com/ollama/ollama/build/_deps/mlx-c-src/mlx/c/ops.cpp:1943"` **Environment**: OS: Ubuntu Linux CPU: AMD GPU: NVIDIA RTX 2000E Ada (16GB) Ollama Version: 0.15.1 Model: x/flux2-klein:9b
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#34834