From 3f5ec9644f5aec2045126cdc5d962ee6f0b44c14 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 9 Aug 2025 07:06:07 -0700 Subject: [PATCH] mtmd: Place the image <__media__> at the top of the prompt --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index 98800239..0a03a084 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -289,7 +289,7 @@ def generate_chat_prompt(user_input, state, **kwargs): if image_refs or attachments_text: enhanced_user_msg = user_msg if image_refs: - enhanced_user_msg += f" {image_refs}" + enhanced_user_msg = f"{image_refs}\n\n{enhanced_user_msg}" if attachments_text: enhanced_user_msg += f"\n\nATTACHMENTS:\n{attachments_text}"