mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[GH-ISSUE #8010] ComfyUI configuration or generation request results in HTTP400 error {"detail":"[ERROR: '<int>']"} #118272
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 @jtslear on GitHub (Dec 23, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8010
Bug Report
Installation Method
Docker
Environment
Open WebUI Version:
mainorv0.4.8Ollama (if applicable): n/a
ComfyUI: I'm keeping up with the default branch, at the time of this writing
601ff9e3Operating System: Bazzite
Browser (if applicable): n/a
Confirmation:
Expected Behavior:
An error description that provides me information as to what has gone wrong.
Actual Behavior:
In the browser the response:
Description
Bug Summary:
I'm receiving a non-useful error when attempting to either save the ComfyUI configuration, or if I somehow get beyond this, and then attempt to generate an image, I get a similar HTTP400 with a differing integer result.
Reproduction Details
Steps to Reproduce:
When attempting to configure the ComfyUI Image integration I'm running into an issue when attempting to apply the settings. I suspect the integers in the error field represent the id's in the node mappings. So in the case when attempting to save settings, node 12.
Note I'm using the provided ComfyUI example for using Flux as the model of choice. That documentation
So with the suspicion that node 12 is incorrectly defined, let's remove it. I'm not yet sure what value is set here, perhaps it's empty at this point? Which we know is going to be invalid.
BUT, I'm able to successfully save. I'm receiving an HTTP200 with a response:
So I'm thinking everything is fine so let's go generate an image. So I proceed to do so, but then the POST request fails with again, an HTTP400, but a differing error!
I suspect in either case, I'm reaching this bit of code: https://github.com/open-webui/open-webui/blob/main/backend/open_webui/apps/images/main.py#L609 But I have no idea what could be wrong. The same workflow works in ComfyUI and appropriately generates images. Even with debug logging enabled, I don't see anything other than HTTP requests that fail. The one thing I do find interesting is that the attempt to save the config is failing on the endpoint
/images/api/v1/models. This suggests something is wrong with a model configuration, but I've followed the docs for Flux, confirmed all is well within ComfyUI. Note that I do see calls to ComfyUI, via packet capture, but I've not been successful at determining what is going wrong. With ComfyUI logging set the debug, nothing is output at all, so I'm not even sure what ComfyUI is doing with these requests. That said, I am getting a valid JSON object back from ComfyUI.response.json
Note that when attempting to generate an image, no traffic is sent to ComfyUI. I've confirmed this via a packet capture between the two services.
Logs and Screenshots
Browser Console Logs:
Click to open lots of text
Docker Container Logs:
Notice in the logs the first attempt to save fails, I then remove the node config as noted in the above text and save successfully, only to later fail when asking for the generation API:
Click to open lots of text
Additional Information
Since we aren't using Open WebUI to initiate a call to any model, as this is ComfyUI's purview, what is the admin setting "Set Default Model" for? If I remove any text here, javascript yells at me. And it doesn't matter if I set it to a model that Open WebUI knows about or not, I'm stuck with the same bad request. I ponder if there's some root causing from this config item.
I know that Open WebUI is successfully able to talk to ComfyUI as the server validation is working. Confirmed via a packet capture as well.
@jtslear commented on GitHub (Dec 23, 2024):
Regarding my additional information portion, the configuration item Set Default Model is not mentioned in the documentation.
15df6c51c1/docs/tutorials/integrations/images.md (L110)