[GH-ISSUE #14538] issue: ComfyUI Integration Relies on Ouput Node Being Last Node in Workflow JSON #55961

Closed
opened 2026-05-05 18:23:04 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @xcjs on GitHub (May 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14538

Originally assigned to: @jackthgu on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.13

Ollama Version (if applicable)

N/A

Operating System

Ubuntu 22.04

Browser (if applicable)

N/A

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

I expect Open Web UI to either correctly identify the output node of a workflow JSON or allow the user to specify the node ID of the output node.

Actual Behavior

What appears to be happening is that Open Web UI assumes the last ordered node in the JSON is the output node. While this happens a majority of the time, it doesn't always.

Steps to Reproduce

  1. Navigate to the Images category of the Admin Panel.
  2. Select ComfyUI as the image generation API.
  3. Paste or upload exported workflow JSON from ComfyUI into the provided text field. I'll include my "broken" and working workflow below. These steps will assume the "broken" workflow is used.
  4. Correctly map the required nodes for the workflow.
  5. Create a new conversation with any LLM.
  6. Either enable image generation with the prompt or click the generate image button at the bottom of an LLM response.
  7. The image will render in ComfyUI, but will not be pulled by Open Web UI. The image generation throbber will either stop after the render finishes or will continue indefinitely in the case where image generation is enabled from the prompt input.

working.json
not-working.json

Logs & Screenshots

No error message occurs, so I haven't attached any logs. I've verified that Open Web UI communicates with my ComfyUI instance and it does render an image with the correct prompt.

Additional Information

I've attached two ComfyUI API workflow JSON - one I've confirmed to work, and one that doesn't. The only difference is in the order of the nodes included in the workflow JSON. As mentioned, both orders are exportable and valid in ComfyUI.

Originally created by @xcjs on GitHub (May 30, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14538 Originally assigned to: @jackthgu on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.13 ### Ollama Version (if applicable) N/A ### Operating System Ubuntu 22.04 ### Browser (if applicable) N/A ### 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 I expect Open Web UI to either correctly identify the output node of a workflow JSON or allow the user to specify the node ID of the output node. ### Actual Behavior What appears to be happening is that Open Web UI assumes the last ordered node in the JSON is the output node. While this happens a majority of the time, it doesn't always. ### Steps to Reproduce 1. Navigate to the Images category of the Admin Panel. 2. Select ComfyUI as the image generation API. 3. Paste or upload exported workflow JSON from ComfyUI into the provided text field. I'll include my "broken" and working workflow below. These steps will assume the "broken" workflow is used. 4. Correctly map the required nodes for the workflow. 5. Create a new conversation with any LLM. 6. Either enable image generation with the prompt or click the generate image button at the bottom of an LLM response. 7. The image will render in ComfyUI, but will not be pulled by Open Web UI. The image generation throbber will either stop after the render finishes or will continue indefinitely in the case where image generation is enabled from the prompt input. [working.json](https://github.com/user-attachments/files/20527341/working.json) [not-working.json](https://github.com/user-attachments/files/20527342/not-working.json) ### Logs & Screenshots No error message occurs, so I haven't attached any logs. I've verified that Open Web UI communicates with my ComfyUI instance and it does render an image with the correct prompt. ### Additional Information I've attached two ComfyUI API workflow JSON - one I've confirmed to work, and one that doesn't. The only difference is in the order of the nodes included in the workflow JSON. As mentioned, both orders are exportable and valid in ComfyUI.
GiteaMirror added the bug label 2026-05-05 18:23:05 -05:00
Author
Owner

@tjbck commented on GitHub (Jun 30, 2025):

We tried to reproduce this issue using a default template that comes with by swapping the items around but weren't able to reproduce. Could you share a minimal version of non-working workflow json with us that doesn't require any additional dependency installation from our end?

Here's the one we tried:

{
  "3": {
    "inputs": {
      "seed": 38951125807111,
      "steps": 20,
      "cfg": 8,
      "sampler_name": "euler",
      "scheduler": "normal",
      "denoise": 1,
      "model": [
        "4",
        0
      ],
      "positive": [
        "6",
        0
      ],
      "negative": [
        "7",
        0
      ],
      "latent_image": [
        "5",
        0
      ]
    },
    "class_type": "KSampler",
    "_meta": {
      "title": "KSampler"
    }
  },
  "4": {
    "inputs": {
      "ckpt_name": "v1-5-pruned-emaonly-fp16.safetensors"
    },
    "class_type": "CheckpointLoaderSimple",
    "_meta": {
      "title": "Load Checkpoint"
    }
  },
  "5": {
    "inputs": {
      "width": 512,
      "height": 512,
      "batch_size": 1
    },
    "class_type": "EmptyLatentImage",
    "_meta": {
      "title": "Empty Latent Image"
    }
  },
  "6": {
    "inputs": {
      "text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
      "clip": [
        "4",
        1
      ]
    },
    "class_type": "CLIPTextEncode",
    "_meta": {
      "title": "CLIP Text Encode (Prompt)"
    }
  },
  "7": {
    "inputs": {
      "text": "text, watermark",
      "clip": [
        "4",
        1
      ]
    },
    "class_type": "CLIPTextEncode",
    "_meta": {
      "title": "CLIP Text Encode (Prompt)"
    }
  },
  "8": {
    "inputs": {
      "samples": [
        "3",
        0
      ],
      "vae": [
        "4",
        2
      ]
    },
    "class_type": "VAEDecode",
    "_meta": {
      "title": "VAE Decode"
    }
  },
  "9": {
    "inputs": {
      "filename_prefix": "ComfyUI",
      "images": [
        "8",
        0
      ]
    },
    "class_type": "SaveImage",
    "_meta": {
      "title": "Save Image"
    }
  }
}
<!-- gh-comment-id:3018069993 --> @tjbck commented on GitHub (Jun 30, 2025): We tried to reproduce this issue using a default template that comes with by swapping the items around but weren't able to reproduce. Could you share a minimal version of non-working workflow json with us that doesn't require any additional dependency installation from our end? Here's the one we tried: ```json { "3": { "inputs": { "seed": 38951125807111, "steps": 20, "cfg": 8, "sampler_name": "euler", "scheduler": "normal", "denoise": 1, "model": [ "4", 0 ], "positive": [ "6", 0 ], "negative": [ "7", 0 ], "latent_image": [ "5", 0 ] }, "class_type": "KSampler", "_meta": { "title": "KSampler" } }, "4": { "inputs": { "ckpt_name": "v1-5-pruned-emaonly-fp16.safetensors" }, "class_type": "CheckpointLoaderSimple", "_meta": { "title": "Load Checkpoint" } }, "5": { "inputs": { "width": 512, "height": 512, "batch_size": 1 }, "class_type": "EmptyLatentImage", "_meta": { "title": "Empty Latent Image" } }, "6": { "inputs": { "text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,", "clip": [ "4", 1 ] }, "class_type": "CLIPTextEncode", "_meta": { "title": "CLIP Text Encode (Prompt)" } }, "7": { "inputs": { "text": "text, watermark", "clip": [ "4", 1 ] }, "class_type": "CLIPTextEncode", "_meta": { "title": "CLIP Text Encode (Prompt)" } }, "8": { "inputs": { "samples": [ "3", 0 ], "vae": [ "4", 2 ] }, "class_type": "VAEDecode", "_meta": { "title": "VAE Decode" } }, "9": { "inputs": { "filename_prefix": "ComfyUI", "images": [ "8", 0 ] }, "class_type": "SaveImage", "_meta": { "title": "Save Image" } } } ```
Author
Owner

@xcjs commented on GitHub (Jul 3, 2025):

Sure! Give me a week or so to look into this.

<!-- gh-comment-id:3029895998 --> @xcjs commented on GitHub (Jul 3, 2025): Sure! Give me a week or so to look into this.
Author
Owner

@xcjs commented on GitHub (Jul 10, 2025):

I haven't forgotten this, but I've had some obligations in my personal life delay this. I definitely want to get to the bottom of this. I'll try to verify before the end of July.

<!-- gh-comment-id:3058322911 --> @xcjs commented on GitHub (Jul 10, 2025): I haven't forgotten this, but I've had some obligations in my personal life delay this. I definitely want to get to the bottom of this. I'll try to verify before the end of July.
Author
Owner

@xcjs commented on GitHub (Aug 5, 2025):

I think with the changes to the ComfyUI API, this issue can be considered obsolete. The new API specifies which node is the output node.

<!-- gh-comment-id:3156760228 --> @xcjs commented on GitHub (Aug 5, 2025): I think with the changes to the ComfyUI API, this issue can be considered obsolete. The new API specifies which node is the output node.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#55961