[GH-ISSUE #561] Multimodal models don't work with > 1 image #99115

Closed
opened 2026-05-17 20:55:43 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @hammeiam on GitHub (Jan 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/561

Bug Report

Description

Bug Summary:
Multimodal chat only responds to first query after a second image is input.

Steps to Reproduce:

  1. Give any prompt, observe a normal response.
  2. Add an image, ask a question about it, observe a normal response
  3. Add a second image, ask a question about it, receive a response to the prompt from step 1. All future responses will be to prompt 1.

Expected Behavior:
I am able to ask questions about any number of single images within one chat. The conversation should not be stuck responding to only one of my prompts.

Actual Behavior:
After uploading a second image, the model only responds to the first-ever prompt I gave it.

Environment

  • Operating System: Ubuntu 20.04
  • Browser (if applicable): Firefox 121

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I have reviewed the troubleshooting.md document.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
n/a no useful info

Docker Container Logs:
n/a just useless request logs

Screenshots (if applicable):
BROKEN - interacting with 2 images
Screenshot 2024-01-24 at 3 58 34 PM

WORKING - interacting with one image
Screenshot 2024-01-24 at 4 09 10 PM

Installation Method

Docker

Additional Information

No custom config. I am able to interact with multiple subsequent images when using the ollama CLI, which is why I'm filing a bug on the UI

Originally created by @hammeiam on GitHub (Jan 24, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/561 # Bug Report ## Description **Bug Summary:** Multimodal chat only responds to first query after a second image is input. **Steps to Reproduce:** 1. Give any prompt, observe a normal response. 2. Add an image, ask a question about it, observe a normal response 3. Add a second image, ask a question about it, receive a response to the prompt from step 1. All future responses will be to prompt 1. **Expected Behavior:** I am able to ask questions about any number of single images within one chat. The conversation should not be stuck responding to only one of my prompts. **Actual Behavior:** After uploading a second image, the model only responds to the first-ever prompt I gave it. ## Environment - **Operating System:** Ubuntu 20.04 - **Browser (if applicable):** Firefox 121 ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I have reviewed the troubleshooting.md document. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** n/a no useful info **Docker Container Logs:** n/a just useless request logs **Screenshots (if applicable):** BROKEN - interacting with 2 images ![Screenshot 2024-01-24 at 3 58 34 PM](https://github.com/ollama-webui/ollama-webui/assets/7607886/e74dfc7e-069d-4c9a-ac10-905d945e0bc4) WORKING - interacting with one image ![Screenshot 2024-01-24 at 4 09 10 PM](https://github.com/ollama-webui/ollama-webui/assets/7607886/0633a1a9-5efa-45e0-af43-6412c2fd46b6) ## Installation Method Docker ## Additional Information No custom config. I am able to interact with multiple subsequent images when using the ollama CLI, which is why I'm filing a bug on the UI
Author
Owner

@tjbck commented on GitHub (Jan 24, 2024):

Hi,Thanks for creating this issue! I'll close this issue as the behaviour you see is caused by limitations of llava model (local models in general). Feel free to make a suggestion if I missed anything, Thanks!

<!-- gh-comment-id:1909043235 --> @tjbck commented on GitHub (Jan 24, 2024): Hi,Thanks for creating this issue! I'll close this issue as the behaviour you see is caused by limitations of llava model (local models in general). Feel free to make a suggestion if I missed anything, Thanks!
Author
Owner

@hammeiam commented on GitHub (Jan 24, 2024):

Hey @tjbck thanks for taking a look but I don't think that's quite right - the model itself can handle multiple images, I believe the issue is elsewhere.

<!-- gh-comment-id:1909053338 --> @hammeiam commented on GitHub (Jan 24, 2024): Hey @tjbck thanks for taking a look but I don't think that's quite right - the model itself can handle multiple images, I believe the issue is elsewhere.
Author
Owner

@tjbck commented on GitHub (Jan 24, 2024):

One thing you can do to verify it's a model issue is testing the model using Ollama CLI, let us know if CLI doesn't seem to experience the same issue!

<!-- gh-comment-id:1909056150 --> @tjbck commented on GitHub (Jan 24, 2024): One thing you can do to verify it's a model issue is testing the model using Ollama CLI, let us know if CLI doesn't seem to experience the same issue!
Author
Owner

@hammeiam commented on GitHub (Jan 24, 2024):

As I wrote in the "notes" section at the end of my ticket:

I am able to interact with multiple subsequent images when using the ollama CLI, which is why I'm filing a bug on the UI

Here's another example using two images in one prompt which works fine. It's just something about images in subsequent prompts that breaks.
Screenshot 2024-01-24 at 4 57 43 PM

<!-- gh-comment-id:1909058201 --> @hammeiam commented on GitHub (Jan 24, 2024): As I wrote in the "notes" section at the end of my ticket: > I am able to interact with multiple subsequent images when using the ollama CLI, which is why I'm filing a bug on the UI Here's another example using two images in one prompt which works fine. It's just something about images in subsequent prompts that breaks. ![Screenshot 2024-01-24 at 4 57 43 PM](https://github.com/ollama-webui/ollama-webui/assets/7607886/60b53a8e-d52c-41a8-ad38-f5c2a2599f4c)
Author
Owner

@tjbck commented on GitHub (Jan 24, 2024):

Hmm, If thats the case, one quick fix could be that we just remove all the previous images when sending a request to Ollama, but I'm not entirely sure if that's the right approach as feels a bit hacky to me, although I believe that's how Ollama is handling multi-images based on what you suggested. Any thoughts?

<!-- gh-comment-id:1909070655 --> @tjbck commented on GitHub (Jan 24, 2024): Hmm, If thats the case, one quick fix could be that we just remove all the previous images when sending a request to Ollama, but I'm not entirely sure if that's the right approach as feels a bit hacky to me, although I believe that's how Ollama is handling multi-images based on what you suggested. Any thoughts?
Author
Owner

@hammeiam commented on GitHub (Jan 25, 2024):

Yeah it seems like that might resolve this issue. Since multimodal is still nascent, a more permanent solution may come up in the future. I also wonder if some array flattening for images isn't happening when it should be?

<!-- gh-comment-id:1909181277 --> @hammeiam commented on GitHub (Jan 25, 2024): Yeah it seems like that might resolve this issue. Since multimodal is still nascent, a more permanent solution may come up in the future. I also wonder if some array flattening for images isn't happening when it should be?
Author
Owner

@hammeiam commented on GitHub (Feb 3, 2024):

@tjbck great minds think alike https://github.com/ollama/ollama/commit/38296ab352ea7dd029f24cea5353b581f53f678b

<!-- gh-comment-id:1925384268 --> @hammeiam commented on GitHub (Feb 3, 2024): @tjbck great minds think alike https://github.com/ollama/ollama/commit/38296ab352ea7dd029f24cea5353b581f53f678b
Author
Owner

@tjbck commented on GitHub (Feb 4, 2024):

#642 should work as intended, let me know if you encounter any issues!

<!-- gh-comment-id:1925636586 --> @tjbck commented on GitHub (Feb 4, 2024): #642 should work as intended, let me know if you encounter any issues!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#99115