mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #20158] issue: [with Fixes] Duplicate / Multiple Images displayed in Chat from a complex ComfyUI workflows #34637
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marhensa on GitHub (Dec 24, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20158
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.43
Ollama Version (if applicable)
No response
Operating System
Fedora 43
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When using complex ComfyUI workflows in Open WebUI, the chat interface often displays multiple duplicate images (it's the same images, bunch of them, it's from nodes like masks, crops, or segmentation previews) instead of just the final result.
Even if a user only includes a single
SaveImageorPreviewImagenode, Open WebUI's current implementation retrieves every possible image in the workflow's execution history. This results in a cluttered chat experience where internal processing steps are shown as final outputs.Proposed Solution / Expected Behaviour:
The
get_imagesfunction inbackend/open_webui/utils/images/comfyui.pyshould be updated to explicitly filter for nodes defined as output nodes. By checking theclass_typeof each node in the workflow against the history outputs, we can ensure that only images intended for the user are retrieved.Additionally, the current implementation contains a redundant nested loop that iterates through the history outputs twice, which is addressed in the fix below.
File affected:
backend/open_webui/utils/images/comfyui.pySuggested Changes:
Before:
After:
This change ensures that only nodes with the
class_typeofSaveImageorPreviewImageare returned to the chat, effectively filtering out intermediate "IMAGE" outputs from nodes likeMaskToImage,CutByMask, orFaceSegmentation, etc.Actual Behavior
Even if a user only includes a single
Save ImageorPreview Imagenode, Open WebUI's current implementation retrieves every possible image in the workflow's execution history. This results in a cluttered chat experience where internal processing steps are shown as final outputs.Steps to Reproduce
Logs & Screenshots
It gives us 5 duplicate images instead of just 1 final result from "Preview Image" or "Save Image".
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Dec 24, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19393 issue: shared chats with images - images won't show
by Classic298 • Nov 23, 2025 •
bug#20091 issue: image is regarded as binary in temp chat
by funnycups • Dec 22, 2025 •
bug#20095 issue: temporary chat causes image attachments to appear as text
by mudkipdev • Dec 22, 2025 •
bug#19816 issue: duplicated images when using openrouter
by M0n7y5 • Dec 08, 2025 •
bug#18995 issue: image generation and edition doesn’t work on temporary chats
by futureshield • Nov 06, 2025 •
bugShow 5 more related issues
#19987 issue: There is a lack of visual consistency between the home page and the chat interface.
by i-iooi-i • Dec 16, 2025 •
bug#19518 issue: Duplicate images displayed in gemini-3-pro-image-preview chats
by davidpede • Nov 26, 2025 •
bug#11739 issue: Generated image is duplicated on some ComfyUI workflows
by ud-klee • Mar 16, 2025 •
bug#16953 issue: When switching to another chat while the image is being generated, the original chat cannot display the generated image properly.
by haochiu • Aug 27, 2025 •
bug#16799 issue: ComfyUI image generation broken in v0.6.23
by links486 • Aug 22, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.