[GH-ISSUE #11320] llm predict error: Failed to create new sequence: failed to process inputs: image: unknown format #7469

Closed
opened 2026-04-12 19:32:30 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @martijk on GitHub (Jul 7, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11320

What is the issue?

I'm running the Ollama official docker image and I'm getting this error in the ollama logs whenever I upload an image (PNG, JPG) to a multimodal model through Open WebUI:

time=2025-07-07T08:25:13.265Z level=DEBUG source=server.go:736 msg="completion request" images=4 prompt=4511 format=""
time=2025-07-07T08:25:13.275Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2]
time=2025-07-07T08:25:13.275Z level=INFO source=server.go:817 msg="llm predict error: Failed to create new sequence: failed to process inputs: image: unknown format"
[GIN] 2025/07/07 - 08:25:13 | 200 |  151.668548ms |       10.88.0.1 | POST     "/api/chat"

I've been digging around a bit and it appears this error originates from the Go image library: https://cs.opensource.google/go/go/+/refs/tags/go1.24.4:src/image/format.go;l=91. It's called from https://github.com/ollama/ollama/blob/main/runner/ollamarunner/runner.go#L639. I'm not sure if I'm hitting a bug (maybe unique to the docker image?), or if it's somehow related to my setup (should Open WebUI detect the image format?). Any pointers would be appreciated.

Relevant log output

time=2025-07-07T08:25:11.048Z level=INFO source=server.go:637 msg="llama runner started in 13.30 seconds"
time=2025-07-07T08:25:11.048Z level=DEBUG source=sched.go:495 msg="finished setting up" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768
time=2025-07-07T08:25:11.049Z level=DEBUG source=server.go:736 msg="completion request" images=0 prompt=1605 format=""
time=2025-07-07T08:25:11.078Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2]
time=2025-07-07T08:25:11.078Z level=DEBUG source=cache.go:136 msg="loading cache slot" id=0 cache=0 prompt=396 used=0 remaining=396
time=2025-07-07T08:25:12.963Z level=DEBUG source=runner.go:548 msg="hit stop token" pending="[< end _ of _ turn >]" stop=<end_of_turn>
[GIN] 2025/07/07 - 08:25:12 | 200 | 16.770018725s |       10.88.0.1 | POST     "/api/chat"
time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:503 msg="context for request finished"
time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:343 msg="runner with non-zero duration has gone idle, adding timer" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 duration=5m0s
time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:361 msg="after processing request finished event" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 refCount=0
time=2025-07-07T08:25:13.240Z level=DEBUG source=sched.go:615 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87
time=2025-07-07T08:25:13.265Z level=DEBUG source=server.go:736 msg="completion request" images=4 prompt=4511 format=""
time=2025-07-07T08:25:13.275Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2]
time=2025-07-07T08:25:13.275Z level=INFO source=server.go:817 msg="llm predict error: Failed to create new sequence: failed to process inputs: image: unknown format"
[GIN] 2025/07/07 - 08:25:13 | 200 |  151.668548ms |       10.88.0.1 | POST     "/api/chat"
time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:434 msg="context for request finished" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768
time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:343 msg="runner with non-zero duration has gone idle, adding timer" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 duration=2562047h47m16.854775807s
time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:361 msg="after processing request finished event" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 refCount=0

OS

Docker

GPU

Nvidia

CPU

Intel

Ollama version

0.9.5

Originally created by @martijk on GitHub (Jul 7, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11320 ### What is the issue? I'm running the Ollama official docker image and I'm getting this error in the ollama logs whenever I upload an image (PNG, JPG) to a multimodal model through Open WebUI: ``` time=2025-07-07T08:25:13.265Z level=DEBUG source=server.go:736 msg="completion request" images=4 prompt=4511 format="" time=2025-07-07T08:25:13.275Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2] time=2025-07-07T08:25:13.275Z level=INFO source=server.go:817 msg="llm predict error: Failed to create new sequence: failed to process inputs: image: unknown format" [GIN] 2025/07/07 - 08:25:13 | 200 | 151.668548ms | 10.88.0.1 | POST "/api/chat" ``` I've been digging around a bit and it appears this error originates from the Go image library: https://cs.opensource.google/go/go/+/refs/tags/go1.24.4:src/image/format.go;l=91. It's called from https://github.com/ollama/ollama/blob/main/runner/ollamarunner/runner.go#L639. I'm not sure if I'm hitting a bug (maybe unique to the docker image?), or if it's somehow related to my setup (should Open WebUI detect the image format?). Any pointers would be appreciated. ### Relevant log output ```shell time=2025-07-07T08:25:11.048Z level=INFO source=server.go:637 msg="llama runner started in 13.30 seconds" time=2025-07-07T08:25:11.048Z level=DEBUG source=sched.go:495 msg="finished setting up" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 time=2025-07-07T08:25:11.049Z level=DEBUG source=server.go:736 msg="completion request" images=0 prompt=1605 format="" time=2025-07-07T08:25:11.078Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2] time=2025-07-07T08:25:11.078Z level=DEBUG source=cache.go:136 msg="loading cache slot" id=0 cache=0 prompt=396 used=0 remaining=396 time=2025-07-07T08:25:12.963Z level=DEBUG source=runner.go:548 msg="hit stop token" pending="[< end _ of _ turn >]" stop=<end_of_turn> [GIN] 2025/07/07 - 08:25:12 | 200 | 16.770018725s | 10.88.0.1 | POST "/api/chat" time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:503 msg="context for request finished" time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:343 msg="runner with non-zero duration has gone idle, adding timer" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 duration=5m0s time=2025-07-07T08:25:12.964Z level=DEBUG source=sched.go:361 msg="after processing request finished event" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 refCount=0 time=2025-07-07T08:25:13.240Z level=DEBUG source=sched.go:615 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 time=2025-07-07T08:25:13.265Z level=DEBUG source=server.go:736 msg="completion request" images=4 prompt=4511 format="" time=2025-07-07T08:25:13.275Z level=DEBUG source=vocabulary.go:52 msg="adding bos token to prompt" id=[2] time=2025-07-07T08:25:13.275Z level=INFO source=server.go:817 msg="llm predict error: Failed to create new sequence: failed to process inputs: image: unknown format" [GIN] 2025/07/07 - 08:25:13 | 200 | 151.668548ms | 10.88.0.1 | POST "/api/chat" time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:434 msg="context for request finished" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:343 msg="runner with non-zero duration has gone idle, adding timer" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 duration=2562047h47m16.854775807s time=2025-07-07T08:25:13.276Z level=DEBUG source=sched.go:361 msg="after processing request finished event" runner.name=registry.ollama.ai/library/gemma3:27b-it-qat runner.inference=cuda runner.devices=1 runner.size="22.2 GiB" runner.vram="22.2 GiB" runner.parallel=1 runner.pid=74 runner.model=/root/.ollama/models/blobs/sha256-ccc0cddac56136ef0969cf2e3e9ac051124c937be42503b47ec570dead85ff87 runner.num_ctx=32768 refCount=0 ``` ### OS Docker ### GPU Nvidia ### CPU Intel ### Ollama version 0.9.5
GiteaMirror added the bug label 2026-04-12 19:32:30 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 7, 2025):

Are you sure all four images are of supported types?

<!-- gh-comment-id:3044085300 --> @rick-github commented on GitHub (Jul 7, 2025): Are you sure all four images are of supported types?
Author
Owner

@martijk commented on GitHub (Jul 7, 2025):

I'm uploading one image at a time, but your question has solved my issue. Apparently when an image is unsupported, it keeps repeating that image when additional images are uploaded in separate prompts. Somehow I must have started every conversation to test this functionality with an incompatible image. And to think that I've had this issue for months already.. Thanks!

The incompatible image turns out to have an incorrect file extension and is actually AVIF instead of JPG. I probably have multiple of those, all saved from the web with Firefox.

<!-- gh-comment-id:3044177263 --> @martijk commented on GitHub (Jul 7, 2025): I'm uploading one image at a time, but your question has solved my issue. Apparently when an image is unsupported, it keeps repeating that image when additional images are uploaded in separate prompts. Somehow I must have started every conversation to test this functionality with an incompatible image. And to think that I've had this issue for months already.. Thanks! The incompatible image turns out to have an incorrect file extension and is actually AVIF instead of JPG. I probably have multiple of those, all saved from the web with Firefox.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7469