[GH-ISSUE #20785] issue: Cannot generate more than 1 image in a chat #19288

Closed
opened 2026-04-20 01:41:43 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @tolidano on GitHub (Jan 18, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20785

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

0.7.2

Ollama Version (if applicable)

LM Studio

Operating System

macOS Tahoe

Browser (if applicable)

Safari

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When I ask it to generate an image, it works the first time in a chat, then on subsequent requests, it should also work.

Actual Behavior

Image
We need to say error.I’m sorry, but I couldn’t generate the image you requested. The following error occurred: [ERROR: Expecting value: line 1 column 1 (char 0)]

After the first image, it fails on every subsequent image with the same error. If I delete this chat and start a new one, the first image works again.

Nothing in the logs in ComfyUI or in Open WebUI or in LM Studio logs that indicate the reason for the error.

Steps to Reproduce

Clean install open web UI, lm studio (with gpt-oss-20b), comfyUI (with z-image turbo template workflow).

Start a chat
Ask for an image
See image successfully
Ask for another image
See error
Start new chat
Ask for an image
See image successfully

Logs & Screenshots

2026-01-18 12:38:11.888 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49993 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2026-01-18 12:38:11.916 | INFO     | open_webui.routers.openai:get_all_models:477 - get_all_models()
2026-01-18 12:38:11.917 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49992 - "POST /api/chat/completions HTTP/1.1" 200
2026-01-18 12:38:11.928 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49993 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2026-01-18 12:38:14.149 | INFO     | open_webui.utils.images.comfyui:comfyui_create_image:198 - WebSocket connection established.
2026-01-18 12:38:14.149 | INFO     | open_webui.utils.images.comfyui:comfyui_create_image:204 - Sending workflow to WebSocket server.
2026-01-18 12:38:14.149 | INFO     | open_webui.utils.images.comfyui:comfyui_create_image:205 - Workflow: {'9': {'inputs': {'filename_prefix': 'z-image', 'images': ['43', 0]}, 'class_type': 'SaveImage', '_meta': {'
title': 'Save Image'}}, '39': {'inputs': {'clip_name': 'qwen_3_4b.safetensors', 'type': 'lumina2', 'device': 'default'}, 'class_type': 'CLIPLoader', '_meta': {'title': 'Load CLIP'}}, '40': {'inputs': {'vae_name': '
ae.safetensors'}, 'class_type': 'VAELoader', '_meta': {'title': 'Load VAE'}}, '41': {'inputs': {'width': 512, 'height': 512, 'batch_size': 1}, 'class_type': 'EmptySD3LatentImage', '_meta': {'title': 'EmptySD3Latent
Image'}}, '42': {'inputs': {'conditioning': ['45', 0]}, 'class_type': 'ConditioningZeroOut', '_meta': {'title': 'ConditioningZeroOut'}}, '43': {'inputs': {'samples': ['44', 0], 'vae': ['40', 0]}, 'class_type': 'VAE
Decode', '_meta': {'title': 'VAE Decode'}}, '44': {'inputs': {'seed': 237843675715867, 'steps': 30, 'cfg': 1, 'sampler_name': 'res_multistep', 'scheduler': 'simple', 'denoise': 1, 'model': ['47', 0], 'positive': ['
45', 0], 'negative': ['42', 0], 'latent_image': ['41', 0]}, 'class_type': 'KSampler', '_meta': {'title': 'KSampler'}}, '45': {'inputs': {'text': "A playful, cartoon-style illustration featuring a friendly dinosaur
with a large, rounded body and a small tail. The dinosaur has a cheerful expression, bright green scales with slightly darker shading on the sides to suggest depth. Its front legs are short and stubby, holding a fr
eshly baked blueberry muffin that sits on its belly. The muffin is golden-brown with a slightly textured crumb and specks of dark blueberries scattered across its top. The dinosaur’s mouth is open in a wide, deligh
ted grin as it takes a big bite, crumbs falling around its cheeks. The background is a simple pastel blue sky with a few fluffy white clouds, giving the scene a light, whimsical atmosphere. The overall composition
is bright and kid-friendly, with bold outlines and smooth color transitions typical of children's cartoons. ", 'clip': ['39', 0]}, 'class_type': 'CLIPTextEncode', '_meta': {'title': 'CLIP Text Encode (Prompt)'}}, '
46': {'inputs': {'unet_name': 'z_image_turbo_bf16.safetensors', 'weight_dtype': 'default'}, 'class_type': 'UNETLoader', '_meta': {'title': 'Load Diffusion Model'}}, '47': {'inputs': {'shift': 3, 'model': ['46', 0]}
, 'class_type': 'ModelSamplingAuraFlow', '_meta': {'title': 'ModelSamplingAuraFlow'}}}
2026-01-18 12:38:14.150 | INFO     | open_webui.utils.images.comfyui:queue_prompt:20 - queue_prompt
2026-01-18 12:38:56.827 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50071 - "GET /_app/version.json HTTP/1.1" 304
2026-01-18 12:39:03.546 | INFO     | open_webui.utils.images.comfyui:get_history:57 - get_history
2026-01-18 12:39:03.547 | INFO     | open_webui.utils.images.comfyui:get_image_url:50 - get_image
2026-01-18 12:39:03.549 | INFO     | open_webui.routers.files:upload_file_handler:225 - file.content_type: image/png False
2026-01-18 12:39:03.555 | INFO     | open_webui.routers.openai:get_all_models:477 - get_all_models()
2026-01-18 12:39:03.578 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "GET /api/v1/files/055aa743-77cf-499e-90be-645c102892af/content HTTP/1.1" 200
2026-01-18 12:39:04.595 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "POST /api/chat/completed HTTP/1.1" 200
2026-01-18 12:39:04.618 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "POST /api/v1/chats/a208ede3-e8d1-4dc7-b7e8-688f89124ac8 HTTP/1.1" 200
2026-01-18 12:39:04.716 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200

Additional Information

No response

Originally created by @tolidano on GitHub (Jan 18, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20785 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version 0.7.2 ### Ollama Version (if applicable) LM Studio ### Operating System macOS Tahoe ### Browser (if applicable) Safari ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When I ask it to generate an image, it works the first time in a chat, then on subsequent requests, it should also work. ### Actual Behavior <img width="1075" height="552" alt="Image" src="https://github.com/user-attachments/assets/79101eac-7282-4ef1-a1ce-57bc7d3c8e49" /> ``` We need to say error.I’m sorry, but I couldn’t generate the image you requested. The following error occurred: [ERROR: Expecting value: line 1 column 1 (char 0)] ``` After the first image, it fails on every subsequent image with the same error. If I delete this chat and start a new one, the first image works again. Nothing in the logs in ComfyUI or in Open WebUI or in LM Studio logs that indicate the reason for the error. ### Steps to Reproduce Clean install open web UI, lm studio (with gpt-oss-20b), comfyUI (with z-image turbo template workflow). Start a chat Ask for an image See image successfully Ask for another image See error Start new chat Ask for an image See image successfully ### Logs & Screenshots ``` 2026-01-18 12:38:11.888 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49993 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2026-01-18 12:38:11.916 | INFO | open_webui.routers.openai:get_all_models:477 - get_all_models() 2026-01-18 12:38:11.917 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49992 - "POST /api/chat/completions HTTP/1.1" 200 2026-01-18 12:38:11.928 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:49993 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2026-01-18 12:38:14.149 | INFO | open_webui.utils.images.comfyui:comfyui_create_image:198 - WebSocket connection established. 2026-01-18 12:38:14.149 | INFO | open_webui.utils.images.comfyui:comfyui_create_image:204 - Sending workflow to WebSocket server. 2026-01-18 12:38:14.149 | INFO | open_webui.utils.images.comfyui:comfyui_create_image:205 - Workflow: {'9': {'inputs': {'filename_prefix': 'z-image', 'images': ['43', 0]}, 'class_type': 'SaveImage', '_meta': {' title': 'Save Image'}}, '39': {'inputs': {'clip_name': 'qwen_3_4b.safetensors', 'type': 'lumina2', 'device': 'default'}, 'class_type': 'CLIPLoader', '_meta': {'title': 'Load CLIP'}}, '40': {'inputs': {'vae_name': ' ae.safetensors'}, 'class_type': 'VAELoader', '_meta': {'title': 'Load VAE'}}, '41': {'inputs': {'width': 512, 'height': 512, 'batch_size': 1}, 'class_type': 'EmptySD3LatentImage', '_meta': {'title': 'EmptySD3Latent Image'}}, '42': {'inputs': {'conditioning': ['45', 0]}, 'class_type': 'ConditioningZeroOut', '_meta': {'title': 'ConditioningZeroOut'}}, '43': {'inputs': {'samples': ['44', 0], 'vae': ['40', 0]}, 'class_type': 'VAE Decode', '_meta': {'title': 'VAE Decode'}}, '44': {'inputs': {'seed': 237843675715867, 'steps': 30, 'cfg': 1, 'sampler_name': 'res_multistep', 'scheduler': 'simple', 'denoise': 1, 'model': ['47', 0], 'positive': [' 45', 0], 'negative': ['42', 0], 'latent_image': ['41', 0]}, 'class_type': 'KSampler', '_meta': {'title': 'KSampler'}}, '45': {'inputs': {'text': "A playful, cartoon-style illustration featuring a friendly dinosaur with a large, rounded body and a small tail. The dinosaur has a cheerful expression, bright green scales with slightly darker shading on the sides to suggest depth. Its front legs are short and stubby, holding a fr eshly baked blueberry muffin that sits on its belly. The muffin is golden-brown with a slightly textured crumb and specks of dark blueberries scattered across its top. The dinosaur’s mouth is open in a wide, deligh ted grin as it takes a big bite, crumbs falling around its cheeks. The background is a simple pastel blue sky with a few fluffy white clouds, giving the scene a light, whimsical atmosphere. The overall composition is bright and kid-friendly, with bold outlines and smooth color transitions typical of children's cartoons. ", 'clip': ['39', 0]}, 'class_type': 'CLIPTextEncode', '_meta': {'title': 'CLIP Text Encode (Prompt)'}}, ' 46': {'inputs': {'unet_name': 'z_image_turbo_bf16.safetensors', 'weight_dtype': 'default'}, 'class_type': 'UNETLoader', '_meta': {'title': 'Load Diffusion Model'}}, '47': {'inputs': {'shift': 3, 'model': ['46', 0]} , 'class_type': 'ModelSamplingAuraFlow', '_meta': {'title': 'ModelSamplingAuraFlow'}}} 2026-01-18 12:38:14.150 | INFO | open_webui.utils.images.comfyui:queue_prompt:20 - queue_prompt 2026-01-18 12:38:56.827 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50071 - "GET /_app/version.json HTTP/1.1" 304 2026-01-18 12:39:03.546 | INFO | open_webui.utils.images.comfyui:get_history:57 - get_history 2026-01-18 12:39:03.547 | INFO | open_webui.utils.images.comfyui:get_image_url:50 - get_image 2026-01-18 12:39:03.549 | INFO | open_webui.routers.files:upload_file_handler:225 - file.content_type: image/png False 2026-01-18 12:39:03.555 | INFO | open_webui.routers.openai:get_all_models:477 - get_all_models() 2026-01-18 12:39:03.578 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "GET /api/v1/files/055aa743-77cf-499e-90be-645c102892af/content HTTP/1.1" 200 2026-01-18 12:39:04.595 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "POST /api/chat/completed HTTP/1.1" 200 2026-01-18 12:39:04.618 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "POST /api/v1/chats/a208ede3-e8d1-4dc7-b7e8-688f89124ac8 HTTP/1.1" 200 2026-01-18 12:39:04.716 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.1.198:50080 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-20 01:41:43 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 18, 2026):

🔍 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:

  1. #20436 issue: image generation cannot finish normally
    by lywbh • Jan 07, 2026 • bug

  2. #18995 issue: image generation and edition doesn’t work on temporary chats
    by futureshield • Nov 06, 2025 • bug

  3. #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

  4. #19393 issue: shared chats with images - images won't show
    by Classic298 • Nov 23, 2025 • bug, confirmed issue

  5. #20091 issue: image is regarded as binary in temp chat
    by funnycups • Dec 22, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3765633336 --> @owui-terminator[bot] commented on GitHub (Jan 18, 2026): 🔍 **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: 1. [#20436](https://github.com/open-webui/open-webui/issues/20436) **issue: image generation cannot finish normally** *by lywbh • Jan 07, 2026 • `bug`* 2. [#18995](https://github.com/open-webui/open-webui/issues/18995) **issue: image generation and edition doesn’t work on temporary chats** *by futureshield • Nov 06, 2025 • `bug`* 3. [#16953](https://github.com/open-webui/open-webui/issues/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`* 4. [#19393](https://github.com/open-webui/open-webui/issues/19393) **issue: shared chats with images - images won't show** *by Classic298 • Nov 23, 2025 • `bug`, `confirmed issue`* 5. [#20091](https://github.com/open-webui/open-webui/issues/20091) **issue: image is regarded as binary in temp chat** *by funnycups • Dec 22, 2025 • `bug`* --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@Classic298 commented on GitHub (Jan 18, 2026):

We're gonna need a hell of a lot more details here, i.e. full setup details for image generation, env vars and more.

As for me, i cannot reproduce this with a normal setup nor with image-native models.

<!-- gh-comment-id:3765635673 --> @Classic298 commented on GitHub (Jan 18, 2026): We're gonna need a hell of a lot more details here, i.e. full setup details for image generation, env vars and more. As for me, i cannot reproduce this with a normal setup nor with image-native models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#19288