[PR #12168] [MERGED] Fixe bug tha image cannot be seen when slice image #76019

Closed
opened 2026-05-05 08:28:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12168
Author: @tc-mb
Created: 9/3/2025
Status: Merged
Merged: 9/12/2025
Merged by: @jessegross

Base: mainHead: Fixe-bug-tha-image-cannot-be-seen-when-there-is-a-slice-image


📝 Commits (4)

  • a553bb5 fix bug
  • cef87ad fix: Correctly pull chunk embeddings after each mtmd_encode_chunk
  • 445c6aa Merge pull request #31 from gabe-l-hart/FixMultiChunkImageEncoding
  • 6b0541a Remove old debugging

📊 Changes

1 file changed (+17 additions, -16 deletions)

View changed files

📝 llama/llama.go (+17 -16)

📄 Description

Fixe bug tha image cannot be seen when slice image.

I discovered a bug in Ollama's recent engine update, llama.cpp, causing all models requiring a slice schema to not display images.
I investigated and discovered that the API used by Ollama in llama.cpp differs from how llama.cpp defines it. As a result, the value of numTokens isn't always the length of the sliced ​​image embed, but rather the end length of the schema. This causes the image embed to not be correctly included during all slice processing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12168 **Author:** [@tc-mb](https://github.com/tc-mb) **Created:** 9/3/2025 **Status:** ✅ Merged **Merged:** 9/12/2025 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `Fixe-bug-tha-image-cannot-be-seen-when-there-is-a-slice-image` --- ### 📝 Commits (4) - [`a553bb5`](https://github.com/ollama/ollama/commit/a553bb56aff45298328a5dd4def825eb091d5fd7) fix bug - [`cef87ad`](https://github.com/ollama/ollama/commit/cef87ad6f47cd8e39b978d3ee5ebd06a73eb3f2e) fix: Correctly pull chunk embeddings after each mtmd_encode_chunk - [`445c6aa`](https://github.com/ollama/ollama/commit/445c6aa69b6f83974ace19d32cbdf485ae08435a) Merge pull request #31 from gabe-l-hart/FixMultiChunkImageEncoding - [`6b0541a`](https://github.com/ollama/ollama/commit/6b0541aa7cae699b7695feecea5779fce3cf42f7) Remove old debugging ### 📊 Changes **1 file changed** (+17 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `llama/llama.go` (+17 -16) </details> ### 📄 Description Fixe bug tha image cannot be seen when slice image. I discovered a bug in Ollama's recent engine update, llama.cpp, causing all models requiring a slice schema to not display images. I investigated and discovered that the API used by Ollama in llama.cpp differs from how llama.cpp defines it. As a result, the value of numTokens isn't always the length of the sliced ​​image embed, but rather the end length of the schema. This causes the image embed to not be correctly included during all slice processing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 08:28:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#76019