[GH-ISSUE #8613] ComfyUI image can't be shown in the UI after activating a API key for ComfyUI #15194

Closed
opened 2026-04-19 21:28:09 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @centigrade-kdk on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8613

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: 0.5.4

  • Ollama (if applicable): --

  • Operating System: --

  • Browser (if applicable): --

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

After setting the ComfyUI API Key the WebUI should generate image and fetch them so show them within the chat

Actual Behavior:

OpenWebUI sends the new API Key perfectly for generating the function but does not send the API during downloading the image to show in the chat

Description

Bug Summary:

  • Generate a image prompt via the web interface
  • Click on the answer at the little image generation button (see the attached screenshot)
  • After the image is generated which I can verify in comfyUI the image can't be loaded

Reproduction Details

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:

INFO  [open_webui.utils.images.comfyui] get_history
INFO  [open_webui.utils.images.comfyui] get_image
ERROR [open_webui.routers.images] Error saving image: 401 Client Error: Unauthorized for url: https://BASE_URL_REMOVED/view?filename=ComfyUI_00261_.png&subfolder=&type=output
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/images.py", line 415, in save_url_image
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://BASE_URL_REMOVED/view?filename=ComfyUI_00261_.png&subfolder=&type=output

Screenshots/Screen Recordings (if applicable):

Image

Additional Information

the function comfyui_generate_image in ./open-webui/backend/open_webui/utils/images/comfyui.py returns only the image url. The actual image is downloaded later without the usage of the API key.

see https://github.com/open-webui/open-webui/pull/7915
ping @short-circuit

Originally created by @centigrade-kdk on GitHub (Jan 16, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8613 # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** 0.5.4 - **Ollama (if applicable):** -- - **Operating System:** -- - **Browser (if applicable):** -- **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: After setting the ComfyUI API Key the WebUI should generate image and fetch them so show them within the chat ## Actual Behavior: OpenWebUI sends the new API Key perfectly for generating the function but does not send the API during downloading the image to show in the chat ## Description **Bug Summary:** - Generate a image prompt via the web interface - Click on the answer at the little image generation button (see the attached screenshot) - After the image is generated which I can verify in comfyUI the image can't be loaded ## Reproduction Details **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] -- **Docker Container Logs:** ``` INFO [open_webui.utils.images.comfyui] get_history INFO [open_webui.utils.images.comfyui] get_image ERROR [open_webui.routers.images] Error saving image: 401 Client Error: Unauthorized for url: https://BASE_URL_REMOVED/view?filename=ComfyUI_00261_.png&subfolder=&type=output Traceback (most recent call last): File "/app/backend/open_webui/routers/images.py", line 415, in save_url_image r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://BASE_URL_REMOVED/view?filename=ComfyUI_00261_.png&subfolder=&type=output ``` **Screenshots/Screen Recordings (if applicable):** <img width="1095" alt="Image" src="https://github.com/user-attachments/assets/71eb04d1-b6f7-487a-8643-c3f7afa03df6" /> ## Additional Information the function `comfyui_generate_image` in `./open-webui/backend/open_webui/utils/images/comfyui.py` returns only the image url. The actual image is downloaded later without the usage of the API key. see https://github.com/open-webui/open-webui/pull/7915 ping @short-circuit
Author
Owner

@tjbck commented on GitHub (Jan 16, 2025):

Might have been addressed in dev, testing wanted here!

<!-- gh-comment-id:2596611518 --> @tjbck commented on GitHub (Jan 16, 2025): Might have been addressed in dev, testing wanted here!
Author
Owner

@centigrade-kdk commented on GitHub (Jan 16, 2025):

@tjbck Yes, you are right, on the current dev branch, the aforementioned issues no longer exist.

<!-- gh-comment-id:2596818915 --> @centigrade-kdk commented on GitHub (Jan 16, 2025): @tjbck Yes, you are right, on the current dev branch, the aforementioned issues no longer exist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15194