mtmd: refactor image preprocessing#21031
Merged
Merged
Conversation
Contributor
Author
|
Test results (llama 4 failed due to OOM, no idea why but I guess no one really use llama 4) |
Contributor
Author
|
@ggerganov this PR is mostly dedup / moving code around, could we get this merged soon? Thanks! |
ngxson
commented
Mar 26, 2026
Comment on lines
-372
to
-374
| } else if (proj == PROJECTOR_TYPE_ULTRAVOX) { | ||
| // [BEGIN_AUDIO] ... (embeddings) ... | ||
| aud_beg = "[BEGIN_AUDIO]"; |
Contributor
Author
There was a problem hiding this comment.
note that there was a mistake on master, [BEGIN_AUDIO] is used by voxtral and not ultravox, it's fixed in this PR
CISC
approved these changes
Mar 26, 2026
ggerganov
approved these changes
Mar 26, 2026
Vect0rM
added a commit
to AtomicBot-ai/atomic-llama-cpp-turboquant
that referenced
this pull request
Apr 2, 2026
The field image_resize_algo was introduced in upstream PR ggml-org#21031 (mtmd refactor) which we haven't merged yet. Our preprocessing pipeline uses explicit img_tool::resize() calls with direct algo parameters, so this field is not needed for Gemma4V support in our branch. Made-with: Cursor
slartibardfast
pushed a commit
to slartibardfast/llama.cpp
that referenced
this pull request
Apr 12, 2026
* mtmd: refactor image pre-processing * correct some places * correct lfm2 * fix deepseek-ocr on server * add comment to clarify about mtmd_image_preprocessor_dyn_size
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* mtmd: refactor image pre-processing * correct some places * correct lfm2 * fix deepseek-ocr on server * add comment to clarify about mtmd_image_preprocessor_dyn_size
rsenthilkumar6
pushed a commit
to rsenthilkumar6/llama.cpp
that referenced
this pull request
May 1, 2026
* mtmd: refactor image pre-processing * correct some places * correct lfm2 * fix deepseek-ocr on server * add comment to clarify about mtmd_image_preprocessor_dyn_size
ljubomirj
pushed a commit
to ljubomirj/llama.cpp
that referenced
this pull request
May 6, 2026
* mtmd: refactor image pre-processing * correct some places * correct lfm2 * fix deepseek-ocr on server * add comment to clarify about mtmd_image_preprocessor_dyn_size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Refactor
clip_image_preprocessto dedicated classes inherit frommtmd_image_preprocessor, making it separated fromclip.cppRequirements