Skip to content

fix(mtmd): jinja typo error in Gemma4ChatHandler when video mtmd - #172

Merged
JamePeng merged 1 commit into
JamePeng:mainfrom
craftingmod:fix-mtmd-jinja-typo
Aug 22, 2026
Merged

fix(mtmd): jinja typo error in Gemma4ChatHandler when video mtmd#172
JamePeng merged 1 commit into
JamePeng:mainfrom
craftingmod:fix-mtmd-jinja-typo

Conversation

@craftingmod

Copy link
Copy Markdown

Summary

In Gemma4ChatHandler, video multimidal JINJA template uses part instead of item, causes

ValueError: GenericMTMDChatHandler(_replace_media_placeholders): media marker mismatch
- marker_count=0
- media_count=1
- media_marker='<__media__>'
Each media item must render to exactly one MTMD media marker. Check whether the chat template rendered both a media tag and the original URL/data URI, or failed to render a media placeholder.

gemma4 could not find media_marker.

This PR corrects typo error.

AI Dispose

Main problem and typo error was founded by Codex, but I'm manually reviewed typo changes.

@JamePeng
JamePeng merged commit 190171d into JamePeng:main Aug 22, 2026
8 checks passed
@craftingmod
craftingmod deleted the fix-mtmd-jinja-typo branch August 22, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants