[GH-ISSUE #24271] issue: Image generation with ComfyUI failing in 0.9.2 #58918

Open
opened 2026-05-06 00:27:36 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jpbreda on GitHub (Apr 30, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24271

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

Docker

Open WebUI Version

0.9.2

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

Browser (if applicable)

Safari 26.4

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

Prior to 0.9.2 Open WebUI would generate an image when prompted "create an image of an apple." This no longer works.

Expected

  • Image generated by ComfyUI should be uploaded to OpenWebUI's file storage
  • Image should appear attached in the chat conversation
  • No errors in OpenWebUI logs

Actual Behavior

  • ComfyUI generates image successfully (confirmed in ComfyUI console and output directory)
  • OpenWebUI logs show AttributeError: 'coroutine' object has no attribute 'id'
  • User sees generic error: 400: [ERROR: 400: [ERROR: Error uploading file]]
  • Image never appears in chat

Steps to Reproduce

  1. Install OpenWebUI v0.9.2 using Docker with the --network host flag
  2. Install ComfyUI 0.11.1 on the same host machine
  3. In OpenWebUI Admin Settings, go to Image Generation
  4. Enable Image Generation and set engine to ComfyUI
  5. Set ComfyUI Base URL to http://localhost:8188/
  6. Upload a valid ComfyUI workflow JSON file (exported in API format)
  7. Map workflow nodes correctly: Prompt to "text", Negative Prompt to "text", Checkpoint to "ckpt_name"
  8. Save the settings
  9. Verify ComfyUI is accessible from within the OpenWebUI Docker container by running: docker exec open-webui curl http://localhost:8188/history (should return JSON)
  10. In OpenWebUI chat, enter a prompt requesting image generation. For example: "Create an image of an apple." Submit the prompt
  11. Check ComfyUI logs to confirm the image was generated successfully (look for "Prompt executed" and "Image saved" messages)
  12. Check ComfyUI output directory to confirm the image file exists (e.g., /home/user/ComfyUI/output/OpenWebUI_*.png)

Logs & Screenshots

ComfyUI generates the image successfully (confirmed in ComfyUI logs and output directory), but OpenWebUI shows error "400: [ERROR: 400: [ERROR: Error uploading file]]" and the image never appears in chat. OpenWebUI logs:

2026-04-30 21:26:03.350 | ERROR | open_webui.routers.files:upload_file_handler:319 - 'coroutine' object has no attribute 'id' Traceback (most recent call last): File "/app/backend/open_webui/routers/files.py", line 259, in upload_file_handler user.id, └ <coroutine object UsersTable.get_user_by_id at 0xe7cf946e7940> AttributeError: 'coroutine' object has no attribute 'id'

Additional Information

Appears to fix:

At the beginning of the upload_file_handler function, add:

user_obj = await user

Then replace all user.* references with user_obj.* within that function.

Originally created by @jpbreda on GitHub (Apr 30, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24271 ### 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 Docker ### Open WebUI Version 0.9.2 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### Browser (if applicable) Safari 26.4 ### 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 Prior to 0.9.2 Open WebUI would generate an image when prompted "create an image of an apple." This no longer works. Expected - Image generated by ComfyUI should be uploaded to OpenWebUI's file storage - Image should appear attached in the chat conversation - No errors in OpenWebUI logs ### Actual Behavior - ComfyUI generates image successfully (confirmed in ComfyUI console and output directory) - OpenWebUI logs show `AttributeError: 'coroutine' object has no attribute 'id'` - User sees generic error: `400: [ERROR: 400: [ERROR: Error uploading file]]` - Image never appears in chat ### Steps to Reproduce 1. Install OpenWebUI v0.9.2 using Docker with the --network host flag 2. Install ComfyUI 0.11.1 on the same host machine 3. In OpenWebUI Admin Settings, go to Image Generation 4. Enable Image Generation and set engine to ComfyUI 5. Set ComfyUI Base URL to http://localhost:8188/ 6. Upload a valid ComfyUI workflow JSON file (exported in API format) 7. Map workflow nodes correctly: Prompt to "text", Negative Prompt to "text", Checkpoint to "ckpt_name" 8. Save the settings 9. Verify ComfyUI is accessible from within the OpenWebUI Docker container by running: docker exec open-webui curl http://localhost:8188/history (should return JSON) 10. In OpenWebUI chat, enter a prompt requesting image generation. For example: "Create an image of an apple." Submit the prompt 11. Check ComfyUI logs to confirm the image was generated successfully (look for "Prompt executed" and "Image saved" messages) 12. Check ComfyUI output directory to confirm the image file exists (e.g., /home/user/ComfyUI/output/OpenWebUI_*.png) ### Logs & Screenshots ComfyUI generates the image successfully (confirmed in ComfyUI logs and output directory), but OpenWebUI shows error "400: [ERROR: 400: [ERROR: Error uploading file]]" and the image never appears in chat. OpenWebUI logs: `2026-04-30 21:26:03.350 | ERROR | open_webui.routers.files:upload_file_handler:319 - 'coroutine' object has no attribute 'id' Traceback (most recent call last): File "/app/backend/open_webui/routers/files.py", line 259, in upload_file_handler user.id, └ <coroutine object UsersTable.get_user_by_id at 0xe7cf946e7940> AttributeError: 'coroutine' object has no attribute 'id'` ### Additional Information Appears to fix: At the beginning of the upload_file_handler function, add: user_obj = await user Then replace all user.* references with user_obj.* within that function.
GiteaMirror added the bug label 2026-05-06 00:27:36 -05:00
Author
Owner

@wvffle commented on GitHub (May 3, 2026):

For me the error appeared in 0.9.1 and still persists in 0.9.2

<!-- gh-comment-id:4366008839 --> @wvffle commented on GitHub (May 3, 2026): For me the error appeared in 0.9.1 and still persists in 0.9.2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58918