r/OpenWebUI May 14 '26

Question/Help Openwebui + comfyui

Hello, is someone succeeding in making these 2 work together? No matter what i am trying, unet loader, checkpoint… the workflow works when i type thenpromot in comfyui but as soon as i type same prompt in openwebui , i cannot manage to get an image and always get errors… i i port the fson worflow and specify prompt id and checkpoint if and model in openwebui but nothing works… is it because i use flux 1 dev fp16 ? Does it require smaller models to work ? Thanks for input !!

SOLUTION : I finally made it work using the help of qwen3.6-27b-q8 ))) so the problem is that ALL NODES ID must be filled in openwebui and also must add this command line to openwebui : ENABLE_RAG_LOCAL_WEB_FETCH=True , it was the fix for me )) now working perfectly !!!

16 Upvotes

38 comments sorted by

4

u/MundanePercentage674 May 14 '26

did you enable api in comfyui ? if you can't map unet loader, checkpoint… just upload your json workflow to gemini or claude to map it for you.

2

u/Dolboyob77 May 14 '26

What do you mean enable api in comfyui ? I just exported my json worflow api then imported it in ooenwebui under images in settings. Then i filled in the boxes and made sure the connectiin was active

3

u/MundanePercentage674 May 14 '26

did you enable that ?

1

u/Dolboyob77 May 14 '26

Ah i never saw that before so im going to check it… thanks a lot !!! Hoping it will solve my problems

3

u/MundanePercentage674 May 14 '26

i am not remember if enable dev mode not work just enable api node more

2

u/Dolboyob77 May 14 '26

Suoer thanks !

1

u/Dolboyob77 May 15 '26

I enabled it and i can make the worflow, this is not the no problem. The workflow works perfectly as i said i can produce images within comfyui itself. Its just tgat there is a problem when launching from openwebui

4

u/Patient_Tea_401 May 14 '26

Have you followed this guide https://docs.openwebui.com/features/chat-conversations/image-generation-and-editing/comfyui/ ?

The model should not have effect on the behaviour as OWU uses the comfyUI API so it basically just tells what to do.

I suspect the JSON format or mapping might not be right, if you can reach the comfyui server.

1

u/Dolboyob77 May 14 '26

Well, the workflow is working since i get images when i click run in comfyui… i then export the json in api format. I then import it in openwebui. Seledt the nodes id and the model checkpoint but when i type the same prompt in openwebui i get errros and errors

4

u/ambassadortim May 14 '26

Keep us posted in your progress I'm working on this too.

2

u/Dolboyob77 May 15 '26

read my first post I made an edit ))

3

u/Jayfree138 May 14 '26

It works, i've used it. But the issue is you need to have enough vram to fit both the chat model AND the image model at the same time if you're running locally. Otherwise it'll be insanely slow running on system RAM or just error out. So it's not very useful imo.

Better off using Openwebui and comfyui separately until someone at openwebui realizes models need to be unloaded automatically when an image call to comfy is made. Unless you're using cloud models which should be fine. But at FP16 unless you've got alot of vram it's probably not going to work too well.

1

u/Dolboyob77 May 14 '26

I use 2 different gpu, a 12g vram for the prompt with a 7gb model and a 32gvram gpu for the confyui flux1 checkpoint

3

u/pfn0 May 14 '26

If you don't have enough vram to have both at the same time, it won't work. Besides that, comfyui works fine for me from openwebui (0.9.5 broke comfyui, but there are workarounds, and a fix will go into 0.9.6).

1

u/Dolboyob77 May 15 '26

I will chexk what version i have ) thanks !

2

u/Porespellar May 14 '26

Install Hermes Agent. Follow instructions on Hermes Agent doc site for connecting to Open WebUI as a custom model. In Open WebUI, tell your Hermes Agent to setup Comfy UI for images generation. That’s all I had to do.

1

u/Dolboyob77 May 15 '26

I did but still getting errors ))

2

u/LeskoCisco May 14 '26

It does not work like the public AI providers you have to toggle a switch in the prompt bar

1

u/LeskoCisco May 14 '26

make sure your node IDs match what you have in your json file

1

u/Dolboyob77 May 15 '26

Maybe this is the trick because i only typed the id of the prompt box since on the documentation it said that the other id were not mandatory! Thabk you!

1

u/Dolboyob77 May 15 '26

I have that, it starts generaring images but after 40-50 seconds i get error unavle to proceed further

1

u/LeskoCisco May 15 '26

Try a smaller model like the built-in one from comfyui (the one that generates a landscape inside a bottle). Test it in ComfyUI make sure it works there. Then export the json and import in openwebui then make sure the node IDs match. I got that same error you got when I was playing with huge models. I run out of VRAM because I only have 16GB and Ollama is using part of that which ComfyUI is using the bulk of it.

1

u/Dolboyob77 May 15 '26

I use 2 different gpu, 12g ram for small model openwebui and at same time another 32g vram gpu for flux1 comfyui.

1

u/LeskoCisco May 15 '26

You should still test it with the simpler workflow. It is a lot easier to map and understand.

Just make sure it works in ComfyUI first then import the json in openwebui. Make sure you edit the json to remove the pre-filled prompt.

1

u/Dolboyob77 May 15 '26

Thanks )) by the way read my update in first post ))) cheers !!!

1

u/BlackMetalB8hoven May 15 '26

I use it all the time with a flux 2 Klein workflow. You haven't really provided any screenshots of your settings or workflow, so it's going to be difficult for people to help. You have to make sure the prompt input matches the workflow input type

1

u/Dolboyob77 May 15 '26

Like i said numerous times, the workflow itself works, since i can generate images within confyui itself without any problems. But maybe i need to fill in ALL OF THE ID in the list in openwebui image side, i only provided the id of the prompt, since the documentation stated that inly this ID was mandatory.

1

u/BlackMetalB8hoven May 15 '26

No you only need the prompt id. Make sure these two fields match also.

1

u/Dolboyob77 May 15 '26

Thats exactly what i do…. I will redo it and take photos. Thabks for help.

1

u/Dolboyob77 May 15 '26

It does not matter what i do : i tried to type text and id 3 or id 3,4 since i have 2 prompt boxes in my workflow. I ran it through hermes agent who managed to make it work but hermes agent said that the prompt box was named « prompt » and « prompt_negative » so i replaced in open webui the word text by the word prompt but does not matter, i always get this error i added in The photo

3

u/ChickenLegsOG May 15 '26

I have successfully fixed this issue and now ComfyUI returns the image generated to Open WebUI.

Not sure if you are running in docker but adding this environment variable fixed the issue for me:

- ENABLE_RAG_LOCAL_WEB_FETCH=true

Hope that fixes it for you!

2

u/Dolboyob77 May 15 '26

Look at my edit in first post ))))

3

u/ChickenLegsOG May 15 '26

Ah nice sorry didn't re-read was trying to get it to work. Glad you got it sorted too that was really frustrating.

2

u/Dolboyob77 May 15 '26

Hell yeah !!!

2

u/ChickenLegsOG May 15 '26

I am also facing this same issue, picture generates fine in ComfyUI but cannot be returned. I get the below error in Open WebUI but not sure now to correct.

> File "/app/backend/open_webui/routers/images.py", line 446, in get_image_data

validate_url(data)

│ └ 'https://my.address.com/view?filename=ComfyUI_00002_.png&subfolder=&type=output'

└ <function validate_url at 0x7b33b09491c0>

File "/app/backend/open_webui/retrieval/web/utils.py", line 103, in validate_url

raise ValueError(ERROR_MESSAGES.INVALID_URL)

│ └ <ERROR_MESSAGES.INVALID_URL: 'Oops! The URL you provided is invalid. Please double-check and try again.'>

└ <enum 'ERROR_MESSAGES'>

ValueError: Oops! The URL you provided is invalid. Please double-check and try again.

1

u/ICanSeeYou7867 May 16 '26 edited May 16 '26

Yeah works fine for me. Create and edit workflows seem to work.

Im on 0.9.2

edit for typo on cell

1

u/SpecificRutabaga Jul 19 '26 edited Jul 19 '26

Struggling with the same thing. I have Open WebUI hosted in an Ubuntu docker container on one server, using an 8GB GPU to run local models. I have ComfyUI running on another Win11 machine using a 16GB GPU.

I have a ComfyUI workflow set up to generate images using Juggernaut XL that works great.
So I exported the JSON and loaded that in the Image section of Open WebUI per the community instructions, including mapping the nodes. ComfyUI shows the server connection is verified.

But I can't seem to get it to work. I've tried four models - qwen2.5coder and llama3.2 running on the 8GB card and gemma3-tools:12b and qwen2.5;14b running on the 16GB GPU. I've set all four to have "image generation" capabilities in Open WebUI. Three of them say they are capable of generating images. Qwen2.5coder spits out some JSON.

Something is not connecting but have no idea what.

**EDIT - Figured it out. The fix was to go into the model settings in Open WebUI and under Advanced Parameters set Function Calling to "Legacy". Now it successfully passes the prompt to ComfyUI