Skip to content

How-ToGPU

How to Generate Images in Open WebUI with ComfyUI

How to connect Open WebUI to a local ComfyUI server so you can create and edit images from chat: starting ComfyUI with --listen, exporting an API workflow, mapping nodes, switching on Image in chat and fixing common problems.

By , Systems & Technical Editor

6 min read

How to Generate Images in Open WebUI with ComfyUI

It follows Open WebUI's official documentation on image generation, its ComfyUI page and its troubleshooting guide, as published on 26 November 2026.

If you already use Open WebUI as a chat front end for local models and ComfyUI for image generation, you can join the two. Once connected, you ask for a picture in chat and Open WebUI sends the request to ComfyUI, runs your chosen workflow on your graphics card and shows the result in the conversation. You can also hook up a separate workflow for editing images.

One thing to know up front: Open WebUI labels its ComfyUI page as a community contribution that isn't supported by the Open WebUI team. The steps are still the documented route, but if something breaks you'll be relying on community help.

What you need

  • ComfyUI installed and working with at least one image workflow you're happy with. If you haven't set it up yet, start with our ComfyUI Windows install guide.

  • Open WebUI installed with admin access. Our Open WebUI and Ollama guide covers that.

  • Enough video memory for both jobs. If your chat model and your image model run on the same graphics card, they compete for VRAM. Our low-VRAM ComfyUI guide has ways to cut ComfyUI's memory use.

Step 1: make ComfyUI reachable

ComfyUI has to accept connections from Open WebUI. Open WebUI's documentation says you must start ComfyUI with the --listen flag so it binds to 0.0.0.0 and accepts connections from other computers on your network. Its interface is then available at http://<your_comfyui_ip>:8188.

How Open WebUI reaches it depends on how you run Open WebUI:

  • Open WebUI in Docker on the same PC. The documentation says the container reaches a host-based ComfyUI through host.docker.internal, so the address is http://host.docker.internal:8188/.

  • Linux with native Docker (no Docker Desktop). Add --add-host=host.docker.internal:host-gateway to the docker run command when you start the Open WebUI container, so that name works.

  • Firewall. If your firewall is active, port 8188 must be allowed. The documentation gives the UFW command for Linux: sudo ufw allow 8188/tcp.

  • Reverse proxy. Open WebUI also opens a WebSocket to /ws on the ComfyUI address, so a proxy in front of ComfyUI must pass WebSocket upgrades.

Because --listen opens ComfyUI to your local network, only use it on a network you trust.

Step 2: export your workflow in API format

Open WebUI can't read a normal saved ComfyUI workflow. It needs the API version:

  1. In ComfyUI, click the ComfyUI logo at the top left and open Settings.

  2. Search for Dev Mode and switch on the option described as "Enable dev mode options (API save, etc.)".

  3. Load the image generation workflow you want to use.

  4. Click the ComfyUI logo again, open the File sub-menu and click Export (API). Name the file and download it.

If you also want image editing, repeat this with an editing workflow and keep the two files separate.

Step 3: add the ComfyUI connection in Open WebUI

  1. In Open WebUI, go to Settings > Images in the admin section and switch on Image Generation.

  2. Add a connection and set Connection Type to ComfyUI.

  3. In URL, enter your ComfyUI address (for example http://host.docker.internal:8188/) and click the verify icon next to it. You should see a success message.

  4. If your ComfyUI requires an API key, enter it in the key field.

  5. Under Generation Workflow, click Upload and pick the API JSON file from step 2.

Open WebUI's documentation says a ComfyUI connection holds one workflow for generating images and one for editing them. Under Capabilities, Generate becomes available once a generation workflow is uploaded and Edit once an edit workflow is uploaded.

Step 4: map the workflow nodes

This is the step that trips most people up. Open WebUI has generic controls such as Prompt, Width and Seed, and it needs to know which node in your workflow each one should change. Each row has two fields: the Key, which is the input name inside the node, and the Node Ids, the node or nodes that hold it.

For image generation, the documentation lists six parameters:

Parameter

Default key

Required?

Prompt

text

Yes

Model

ckpt_name

No

Width

width

No

Height

height

No

Steps

steps

No

Seed

seed

No

Only the prompt node ID is required. To find node IDs, the documentation suggests opening your exported API JSON in a text editor: the top-level keys are the node IDs, and each node's inputs block shows the exact key names. For example, a KSampler node might be ID 3 with seed, steps and cfg inputs, so you'd put seed and 3 in the Seed row.

A few rules from the documentation that save time:

  • Keys don't always match the defaults. Some workflows call the seed noise_seed, so change the key to match.

  • Some entries need several nodes. Workflows using Flux models, for example, may need more than one node ID for one entry. Separate them with commas, such as 1, 2.

  • A mapped Seed gets a new random seed on every request, so you won't get the same image twice by accident.

  • Set a default size. Under Advanced, Image Size and Steps are optional defaults, but without an Image Size, ComfyUI receives 512x512.

  • Output nodes. Open WebUI returns images from Save Image, Save Image (Advanced), Save Animated WEBP, Save Animated PNG and Preview Image nodes.

Leave Model IDs empty to use the model set in the workflow, or add model names to offer a choice. Open WebUI fills its suggestions from the last verify, so click verify again after mapping a Model node. Finally, set Access Control and click Save. The documentation warns that without a grant, only admins can use the connection.

Step 5: optional image editing

To edit images in chat, switch Image Edit on in the same settings page, then upload your editing workflow in the Edit Workflow section of the same connection. Editing uses different default keys: Image (image, required), Prompt (prompt, required), Model (unet_name), Width and Height. For edits with several input images, list one LoadImage node ID per image, separated by commas; images beyond the number of IDs are dropped.

Step 6: generate an image in chat

Open WebUI's usage guide says there's no "Generate Image" button on messages. Instead:

  1. Keep your normal chat model selected at the top of the chat.

  2. Open the + menu in the message box and switch Image on.

  3. Describe the image and click Send.

The documentation calls picking the image model as the chat model "the most common setup mistake". An image model can't hold a conversation, so leave the model selector on your chat model and choose the image model from the Image entry in the + menu if you have more than one.

With the default Native function calling, the chat model writes the image prompt itself when it calls the image tool. In the older Legacy mode, every message you send while the toggle is on goes to the image model, and a task model rewrites your message into an image prompt unless you switch off Image Prompt Generation.

If it doesn't work

Open WebUI's troubleshooting guide suggests checking, in order:

  • Image Generation is on in Settings > Images, and the Image toggle is on in the chat's + menu.

  • The chat model has the Image Generation capability in Workspace > Models > Edit, and your role has the Image Generation permission.

  • The connection URL and key are right: click verify again. The connection must be enabled, have Generate switched on and include your user in Access Control.

  • The selected model is available in ComfyUI. Watch the ComfyUI console for activity when you send a request.

If Image is missing from the + menu entirely, the usage guide says image generation is off globally, the capability is off on a selected model, or your role lacks permission.

If you're still choosing a card for image work, see our best graphics cards for ComfyUI.

Our verdict

Connecting Open WebUI to ComfyUI comes down to six steps: start ComfyUI with --listen, export your workflow in API format, add a ComfyUI connection, map at least the prompt node, set access, then switch on Image in the chat's + menu. Most problems come from node mapping or from selecting the image model as the chat model, so check those first. Bear in mind that Open WebUI treats its ComfyUI page as a community tutorial, and that running chat and image models on one graphics card means sharing its video memory.

The bottom line

Connecting Open WebUI to ComfyUI comes down to six steps: start ComfyUI with --listen, export your workflow in API format, add a ComfyUI connection, map at least the prompt node, set access, then switch on Image in the chat's + menu. Most problems come from node mapping or from selecting the image model as the chat model, so check those first. Bear in mind that Open WebUI treats its ComfyUI page as a community tutorial, and that running chat and image models on one graphics card means sharing its video memory.

Sources

  1. 01Open WebUI Docs, ComfyUI (image generation and editing)
  2. 02Open WebUI Docs, Image Generation Usage
  3. 03Open WebUI Docs, Image Generation Troubleshooting

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free Tools to Test a New PC in 2026

Best Picks

Best Free Tools to Test a New PC in 2026

To check a new PC or parts inside the 14-day cooling-off period, use CPU-Z to confirm the CPU, motherboard and RAM, GPU-Z for the graphics card and its PCIe link, and CrystalDiskInfo for SSD health. CrystalDiskMark shows whether the SSD runs at the right speed, MemTest86 checks RAM for errors from a USB stick, and OCCT with HWiNFO open tests stability. All are free.

Hannah Vance7 min

PC Game Pass vs Steam: Subscribe or Buy Your Games?

Versus

PC Game Pass vs Steam: Subscribe or Buy Your Games?

PC Game Pass is a subscription: Xbox says it includes 300+ PC games, day-one titles and EA Play, but you lose access if you cancel or a game leaves, and it has no cloud gaming. Steam is a shop: you buy each game once, keep it, and get Valve's 14-day, under-two-hours refund policy. Game Pass suits people who play lots of new games; Steam suits people who play a few for a long time.

Callum Reid7 min

How to Use Passkeys in Windows 11

How-To

How to Use Passkeys in Windows 11

Passkeys replace typing a password with a Windows Hello check (face, fingerprint or PIN), and each one only works on the site it was created for, so it can't be handed to a phishing page. On Windows 11 you choose where they're saved (this PC, a synced password manager, your phone or a security key), add one to your Microsoft account and to each site that offers it, and manage local ones under Sett

Marcus Thorne8 min

Open WebUI 0.13.5 Adds Model Routers, Folder Workspaces and ComfyUI Video

News

Open WebUI 0.13.5 Adds Model Routers, Folder Workspaces and ComfyUI Video

Open WebUI 0.13.5, released on 25 November 2026, adds routers that pick a model for each question, project folder workspaces, video generation through your own ComfyUI workflows and big speed-ups for long chats. It also migrates the chat database, so back up first.

Eleanor Shaw6 min