Originally created by @links486 on GitHub (Aug 22, 2025).
Check Existing Issues
I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Docker
Open WebUI Version
v0.6.23
Ollama Version (if applicable)
No response
Operating System
macOS Sequoia 15.6.1
Browser (if applicable)
No response
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
Images continue to be generated correctly via ComfyUI after upgrading to Open WebUI v0.6.23.
Actual Behavior
Image generation fails with the following error: ERROR | open_webui.utils.middleware:chat_image_generation_handler:586 - argument of type 'NoneType' is not iterable
Steps to Reproduce
Launch the latest Docker image.
Configure ComfyUI in the Open WebUI admin settings (import a workflow.json file that was previously working; set the base URL and other required fields; etc.).
Alternatively, simply upgrade to the latest release via Watchtower if you had already previously configured ComfyUI.
Attempt to generate an image.
Observe that the generation fails: "An error occurred while generating an image"
Check the Docker logs to see the Traceback (also pasted below).
Logs & Screenshots
Docker log
2025-08-21 17:51:30.464 | 2025-08-21 23:51:30.460 | ERROR | open_webui.utils.middleware:chat_image_generation_handler:586 - argument of type 'NoneType' is not iterable
2025-08-21 17:51:30.464 | Traceback (most recent call last):
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "<frozen runpy>", line 198, in _run_module_as_main
2025-08-21 17:51:30.464 | File "<frozen runpy>", line 88, in _run_code
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/__main__.py", line 4, in <module>
2025-08-21 17:51:30.464 | uvicorn.main()
2025-08-21 17:51:30.464 | │ └ <Command main>
2025-08-21 17:51:30.464 | └ <module 'uvicorn' from '/usr/local/lib/python3.11/site-packages/uvicorn/__init__.py'>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
2025-08-21 17:51:30.464 | return self.main(*args, **kwargs)
2025-08-21 17:51:30.464 | │ │ │ └ {}
2025-08-21 17:51:30.464 | │ │ └ ()
2025-08-21 17:51:30.464 | │ └ <function Command.main at 0xffffa969eb60>
2025-08-21 17:51:30.464 | └ <Command main>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1363, in main
2025-08-21 17:51:30.464 | rv = self.invoke(ctx)
2025-08-21 17:51:30.464 | │ │ └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | │ └ <function Command.invoke at 0xffffa969e840>
2025-08-21 17:51:30.464 | └ <Command main>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
2025-08-21 17:51:30.464 | return ctx.invoke(self.callback, **ctx.params)
2025-08-21 17:51:30.464 | │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-08-21 17:51:30.464 | │ │ │ │ └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | │ │ │ └ <function main at 0xffffa932dd00>
2025-08-21 17:51:30.464 | │ │ └ <Command main>
2025-08-21 17:51:30.464 | │ └ <function Context.invoke at 0xffffa969da80>
2025-08-21 17:51:30.464 | └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 794, in invoke
2025-08-21 17:51:30.464 | return callback(*args, **kwargs)
2025-08-21 17:51:30.464 | │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-08-21 17:51:30.464 | │ └ ()
2025-08-21 17:51:30.464 | └ <function main at 0xffffa932dd00>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 413, in main
2025-08-21 17:51:30.464 | run(
2025-08-21 17:51:30.464 | └ <function run at 0xffffa96a3d80>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 580, in run
2025-08-21 17:51:30.464 | server.run()
2025-08-21 17:51:30.464 | │ └ <function Server.run at 0xffffa97351c0>
2025-08-21 17:51:30.464 | └ <uvicorn.server.Server object at 0xffffa9535850>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
2025-08-21 17:51:30.464 | return asyncio.run(self.serve(sockets=sockets))
2025-08-21 17:51:30.464 | │ │ │ │ └ None
2025-08-21 17:51:30.464 | │ │ │ └ <function Server.serve at 0xffffa9735260>
2025-08-21 17:51:30.464 | │ │ └ <uvicorn.server.Server object at 0xffffa9535850>
2025-08-21 17:51:30.464 | │ └ <function run at 0xffffa9bb93a0>
2025-08-21 17:51:30.464 | └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2025-08-21 17:51:30.464 | return runner.run(main)
2025-08-21 17:51:30.464 | │ │ └ <coroutine object Server.serve at 0xffffa92ca890>
2025-08-21 17:51:30.464 | │ └ <function Runner.run at 0xffffa996cf40>
2025-08-21 17:51:30.464 | └ <asyncio.runners.Runner object at 0xffffa9333810>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2025-08-21 17:51:30.464 | return self._loop.run_until_complete(task)
2025-08-21 17:51:30.464 | │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:71> wai...
2025-08-21 17:51:30.464 | │ │ └ <cyfunction Loop.run_until_complete at 0xffffa8df42b0>
2025-08-21 17:51:30.464 | │ └ <uvloop.Loop running=True closed=False debug=False>
2025-08-21 17:51:30.464 | └ <asyncio.runners.Runner object at 0xffffa9333810>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/main.py", line 1492, in process_chat
2025-08-21 17:51:30.464 | form_data, metadata, events = await process_chat_payload(
2025-08-21 17:51:30.464 | │ │ └ <function process_chat_payload at 0xffff1a8e7d80>
2025-08-21 17:51:30.464 | │ └ {'user_id': '1242f3f6-9959-48eb-ac49-d6f4195e6279', 'chat_id': '4eb91401-c547-4328-9168-5558e3175baa', 'message_id': '2e8c27e...
2025-08-21 17:51:30.464 | └ {'stream': True, 'model': 'Qwen3-30B-A3B-Instruct-2507', 'messages': [{'role': 'user', 'content': 'This is a test.'}], 'metad...
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/utils/middleware.py", line 880, in process_chat_payload
2025-08-21 17:51:30.464 | form_data = await chat_image_generation_handler(
2025-08-21 17:51:30.464 | └ <function chat_image_generation_handler at 0xffff1a8e7ba0>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | > File "/app/backend/open_webui/utils/middleware.py", line 556, in chat_image_generation_handler
2025-08-21 17:51:30.464 | images = await image_generations(
2025-08-21 17:51:30.464 | └ <function image_generations at 0xffff1bc08a40>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/routers/images.py", line 493, in image_generations
2025-08-21 17:51:30.464 | if "x" in form_data.size:
2025-08-21 17:51:30.464 | │ └ None
2025-08-21 17:51:30.464 | └ GenerateImageForm(model=None, prompt="A simple, clean white background with a single, centered, solid black circle. The circl...
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | TypeError: argument of type 'NoneType' is not iterable
Additional Information
The size field is set in the admin interface. Nothing about this configuration changed from the previous release where it was working correctly.
Originally created by @links486 on GitHub (Aug 22, 2025).
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Docker
### Open WebUI Version
v0.6.23
### Ollama Version (if applicable)
_No response_
### Operating System
macOS Sequoia 15.6.1
### Browser (if applicable)
_No response_
### 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
Images continue to be generated correctly via ComfyUI after upgrading to Open WebUI v0.6.23.
### Actual Behavior
Image generation fails with the following error:
`ERROR | open_webui.utils.middleware:chat_image_generation_handler:586 - argument of type 'NoneType' is not iterable`
### Steps to Reproduce
1. Launch the latest Docker image.
2. Configure ComfyUI in the Open WebUI admin settings (import a `workflow.json` file that was previously working; set the base URL and other required fields; etc.).
- Alternatively, simply upgrade to the latest release via Watchtower if you had already previously configured ComfyUI.
3. Attempt to generate an image.
4. Observe that the generation fails: "An error occurred while generating an image"
5. Check the Docker logs to see the Traceback (also pasted below).
### Logs & Screenshots
## Docker log
```
2025-08-21 17:51:30.464 | 2025-08-21 23:51:30.460 | ERROR | open_webui.utils.middleware:chat_image_generation_handler:586 - argument of type 'NoneType' is not iterable
2025-08-21 17:51:30.464 | Traceback (most recent call last):
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "<frozen runpy>", line 198, in _run_module_as_main
2025-08-21 17:51:30.464 | File "<frozen runpy>", line 88, in _run_code
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/__main__.py", line 4, in <module>
2025-08-21 17:51:30.464 | uvicorn.main()
2025-08-21 17:51:30.464 | │ └ <Command main>
2025-08-21 17:51:30.464 | └ <module 'uvicorn' from '/usr/local/lib/python3.11/site-packages/uvicorn/__init__.py'>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
2025-08-21 17:51:30.464 | return self.main(*args, **kwargs)
2025-08-21 17:51:30.464 | │ │ │ └ {}
2025-08-21 17:51:30.464 | │ │ └ ()
2025-08-21 17:51:30.464 | │ └ <function Command.main at 0xffffa969eb60>
2025-08-21 17:51:30.464 | └ <Command main>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1363, in main
2025-08-21 17:51:30.464 | rv = self.invoke(ctx)
2025-08-21 17:51:30.464 | │ │ └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | │ └ <function Command.invoke at 0xffffa969e840>
2025-08-21 17:51:30.464 | └ <Command main>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
2025-08-21 17:51:30.464 | return ctx.invoke(self.callback, **ctx.params)
2025-08-21 17:51:30.464 | │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-08-21 17:51:30.464 | │ │ │ │ └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | │ │ │ └ <function main at 0xffffa932dd00>
2025-08-21 17:51:30.464 | │ │ └ <Command main>
2025-08-21 17:51:30.464 | │ └ <function Context.invoke at 0xffffa969da80>
2025-08-21 17:51:30.464 | └ <click.core.Context object at 0xffffaa65c690>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 794, in invoke
2025-08-21 17:51:30.464 | return callback(*args, **kwargs)
2025-08-21 17:51:30.464 | │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-08-21 17:51:30.464 | │ └ ()
2025-08-21 17:51:30.464 | └ <function main at 0xffffa932dd00>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 413, in main
2025-08-21 17:51:30.464 | run(
2025-08-21 17:51:30.464 | └ <function run at 0xffffa96a3d80>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 580, in run
2025-08-21 17:51:30.464 | server.run()
2025-08-21 17:51:30.464 | │ └ <function Server.run at 0xffffa97351c0>
2025-08-21 17:51:30.464 | └ <uvicorn.server.Server object at 0xffffa9535850>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
2025-08-21 17:51:30.464 | return asyncio.run(self.serve(sockets=sockets))
2025-08-21 17:51:30.464 | │ │ │ │ └ None
2025-08-21 17:51:30.464 | │ │ │ └ <function Server.serve at 0xffffa9735260>
2025-08-21 17:51:30.464 | │ │ └ <uvicorn.server.Server object at 0xffffa9535850>
2025-08-21 17:51:30.464 | │ └ <function run at 0xffffa9bb93a0>
2025-08-21 17:51:30.464 | └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2025-08-21 17:51:30.464 | return runner.run(main)
2025-08-21 17:51:30.464 | │ │ └ <coroutine object Server.serve at 0xffffa92ca890>
2025-08-21 17:51:30.464 | │ └ <function Runner.run at 0xffffa996cf40>
2025-08-21 17:51:30.464 | └ <asyncio.runners.Runner object at 0xffffa9333810>
2025-08-21 17:51:30.464 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2025-08-21 17:51:30.464 | return self._loop.run_until_complete(task)
2025-08-21 17:51:30.464 | │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:71> wai...
2025-08-21 17:51:30.464 | │ │ └ <cyfunction Loop.run_until_complete at 0xffffa8df42b0>
2025-08-21 17:51:30.464 | │ └ <uvloop.Loop running=True closed=False debug=False>
2025-08-21 17:51:30.464 | └ <asyncio.runners.Runner object at 0xffffa9333810>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/main.py", line 1492, in process_chat
2025-08-21 17:51:30.464 | form_data, metadata, events = await process_chat_payload(
2025-08-21 17:51:30.464 | │ │ └ <function process_chat_payload at 0xffff1a8e7d80>
2025-08-21 17:51:30.464 | │ └ {'user_id': '1242f3f6-9959-48eb-ac49-d6f4195e6279', 'chat_id': '4eb91401-c547-4328-9168-5558e3175baa', 'message_id': '2e8c27e...
2025-08-21 17:51:30.464 | └ {'stream': True, 'model': 'Qwen3-30B-A3B-Instruct-2507', 'messages': [{'role': 'user', 'content': 'This is a test.'}], 'metad...
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/utils/middleware.py", line 880, in process_chat_payload
2025-08-21 17:51:30.464 | form_data = await chat_image_generation_handler(
2025-08-21 17:51:30.464 | └ <function chat_image_generation_handler at 0xffff1a8e7ba0>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | > File "/app/backend/open_webui/utils/middleware.py", line 556, in chat_image_generation_handler
2025-08-21 17:51:30.464 | images = await image_generations(
2025-08-21 17:51:30.464 | └ <function image_generations at 0xffff1bc08a40>
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | File "/app/backend/open_webui/routers/images.py", line 493, in image_generations
2025-08-21 17:51:30.464 | if "x" in form_data.size:
2025-08-21 17:51:30.464 | │ └ None
2025-08-21 17:51:30.464 | └ GenerateImageForm(model=None, prompt="A simple, clean white background with a single, centered, solid black circle. The circl...
2025-08-21 17:51:30.464 |
2025-08-21 17:51:30.464 | TypeError: argument of type 'NoneType' is not iterable
```
### Additional Information
The size field is set in the admin interface. Nothing about this configuration changed from the previous release where it was working correctly.
<img width="287" height="491" alt="Image" src="https://github.com/user-attachments/assets/8e72f690-ad23-422c-8a19-7565244a69eb" />
GiteaMirror
added the bug label 2025-11-11 16:46:24 -06:00
Experiencing the same issue. I cannot call any workflow using the Native implementation, it always returns NoneType is not iterable
@Haervwe commented on GitHub (Aug 22, 2025):
Experiencing the same issue. I cannot call any workflow using the Native implementation, it always returns NoneType is not iterable
Seeing the same with both Comfy and Automatic111 image generation. Reverting Open-WebUI back to 0.6.22 both work properly.
@Codelica commented on GitHub (Aug 22, 2025):
Seeing the same with both Comfy and Automatic111 image generation. Reverting Open-WebUI back to 0.6.22 both work properly.
This is only a temporary fix. If it gets fixed in a future update, it should be overwritten.
For context, I got this working with the help of an AI, just to clarify.
Before making any changes, create a backup of the file in case something goes wrong or the fix doesn’t work.
In open_webui/routers/images.py, look for the line:
if "x" in form_data.size:
and change it to:
if form_data.size and "x" in form_data.size:
If that fixes everything, great. If you encounter an error like:
@GFYURI commented on GitHub (Aug 22, 2025):
This is only a temporary fix. If it gets fixed in a future update, it should be overwritten.
For context, I got this working with the help of an AI, just to clarify.
Before making any changes, create a backup of the file in case something goes wrong or the fix doesn’t work.
In open_webui/routers/images.py, look for the line:
if "x" in form_data.size:
and change it to:
if form_data.size and "x" in form_data.size:
If that fixes everything, great. If you encounter an error like:
TypeError: upload_file() missing 1 required positional argument: 'background_tasks'
try the following. In the same images.py, locate:
def upload_image(request, image_data, content_type, metadata, user):
and replace it with:
def upload_image(request, image_data, content_type, metadata, user):
image_format = mimetypes.guess_extension(content_type)
file = UploadFile(
file=io.BytesIO(image_data),
filename=f"generated-image{image_format}",
headers={
"content-type": content_type,
},
)
try:
# Try with background_tasks (newer versions)
from fastapi import BackgroundTasks
background_tasks = BackgroundTasks()
file_item = upload_file(
request=request,
file=file,
metadata=metadata,
process=False,
user=user,
background_tasks=background_tasks
)
except TypeError:
# Fallback for older versions
file_item = upload_file(
request=request,
file=file,
metadata=metadata,
process=False,
user=user
)
url = request.app.url_path_for("get_file_content_by_id", id=file_item.id)
return url
Then just restart and test.
Note that this is not just ComfyUI image generation but any image generation (I'm using Gemini)
@anthrotype commented on GitHub (Aug 22, 2025):
https://github.com/open-webui/open-webui/commit/88a5b5ff4c40a339aecb796846cfc5223407ce61 only fixed the
```
TypeError: argument of type 'NoneType' is not iterable
```
But after fixing that, I am still getting another error, same as @GFYURI wrote above
```
TypeError: upload_file() missing 1 required positional argument: 'background_tasks'
```
Note that this is not just ComfyUI image generation but any image generation (I'm using Gemini)
def upload_image(request, image_data, content_type, metadata, user):
image_format = mimetypes.guess_extension(content_type)
file = UploadFile(
file=io.BytesIO(image_data),
filename=f"generated-image{image_format}", # will be converted to a unique ID on upload_file
headers={
"content-type": content_type,
},
)
file_item = upload_file(
request, file=file, metadata=metadata, process=False, user=user // <------------- HERE
)
url = request.app.url_path_for("get_file_content_by_id", id=file_item.id)
return url
@fighter3005 commented on GitHub (Aug 22, 2025):
Yes, I just tried and can confirm. Still the same error.
I am a bit confused, since the upload_file method is only used for uploading images!? I guess
```
file_item = upload_file(
request, None, file=file, metadata=metadata, process=False, user=user
)
```
should work in image.py
```
def upload_image(request, image_data, content_type, metadata, user):
image_format = mimetypes.guess_extension(content_type)
file = UploadFile(
file=io.BytesIO(image_data),
filename=f"generated-image{image_format}", # will be converted to a unique ID on upload_file
headers={
"content-type": content_type,
},
)
file_item = upload_file(
request, file=file, metadata=metadata, process=False, user=user // <------------- HERE
)
url = request.app.url_path_for("get_file_content_by_id", id=file_item.id)
return url
```
Same here, the prompt is correctly sent to ComfyUI, the image is generated (I can see it in the ComfyUI Dashboard) but OWUI fails to retrieve and show the generated image.
So much for a critital bug fix...
@nihilimbo commented on GitHub (Aug 22, 2025):
Same here, the prompt is correctly sent to ComfyUI, the image is generated (I can see it in the ComfyUI Dashboard) but OWUI fails to retrieve and show the generated image.
So much for a critital bug fix...
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @links486 on GitHub (Aug 22, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.23
Ollama Version (if applicable)
No response
Operating System
macOS Sequoia 15.6.1
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Images continue to be generated correctly via ComfyUI after upgrading to Open WebUI v0.6.23.
Actual Behavior
Image generation fails with the following error:
ERROR | open_webui.utils.middleware:chat_image_generation_handler:586 - argument of type 'NoneType' is not iterableSteps to Reproduce
workflow.jsonfile that was previously working; set the base URL and other required fields; etc.).Logs & Screenshots
Docker log
Additional Information
The size field is set in the admin interface. Nothing about this configuration changed from the previous release where it was working correctly.
@Haervwe commented on GitHub (Aug 22, 2025):
Experiencing the same issue. I cannot call any workflow using the Native implementation, it always returns NoneType is not iterable
@dusty-du commented on GitHub (Aug 22, 2025):
yep same here
@Codelica commented on GitHub (Aug 22, 2025):
Seeing the same with both Comfy and Automatic111 image generation. Reverting Open-WebUI back to 0.6.22 both work properly.
@GFYURI commented on GitHub (Aug 22, 2025):
This is only a temporary fix. If it gets fixed in a future update, it should be overwritten.
For context, I got this working with the help of an AI, just to clarify.
Before making any changes, create a backup of the file in case something goes wrong or the fix doesn’t work.
In open_webui/routers/images.py, look for the line:
if "x" in form_data.size:
and change it to:
if form_data.size and "x" in form_data.size:
If that fixes everything, great. If you encounter an error like:
TypeError: upload_file() missing 1 required positional argument: 'background_tasks'
try the following. In the same images.py, locate:
def upload_image(request, image_data, content_type, metadata, user):
and replace it with:
def upload_image(request, image_data, content_type, metadata, user):
image_format = mimetypes.guess_extension(content_type)
file = UploadFile(
file=io.BytesIO(image_data),
filename=f"generated-image{image_format}",
headers={
"content-type": content_type,
},
)
Then just restart and test.
@peiwenxu commented on GitHub (Aug 22, 2025):
Same issue here
@ALIENvsROBOT commented on GitHub (Aug 22, 2025):
I think it might be issue because of this fix #16726
@tjbck commented on GitHub (Aug 22, 2025):
Should be addressed with
88a5b5ff4c@anthrotype commented on GitHub (Aug 22, 2025):
https://github.com/open-webui/open-webui/commit/88a5b5ff4c40a339aecb796846cfc5223407ce61 only fixed the
But after fixing that, I am still getting another error, same as @GFYURI wrote above
Note that this is not just ComfyUI image generation but any image generation (I'm using Gemini)
@fighter3005 commented on GitHub (Aug 22, 2025):
Yes, I just tried and can confirm. Still the same error.
I am a bit confused, since the upload_file method is only used for uploading images!? I guess
should work in image.py
@nihilimbo commented on GitHub (Aug 22, 2025):
Same here, the prompt is correctly sent to ComfyUI, the image is generated (I can see it in the ComfyUI Dashboard) but OWUI fails to retrieve and show the generated image.
So much for a critital bug fix...
@ALIENvsROBOT commented on GitHub (Aug 22, 2025):
@tjbck Please reopen and fix the bug which still exist
@Haervwe commented on GitHub (Aug 22, 2025):
Yes I'm now facing the same upload files issue as above , still after the update
@kristapsx commented on GitHub (Aug 22, 2025):
Fresh install today, first time set up, and same issue with 0.6.24 version.
@tjbck commented on GitHub (Aug 22, 2025):
https://github.com/open-webui/open-webui/pull/16821
@Haervwe commented on GitHub (Aug 22, 2025):
Fixed for me on latest version too