Nodes/comfyui-webui-generator-node/ComfyUI WebUI Generator (Open)
ComfyUI Node

ComfyUI WebUI Generator (Open)

Turn your ComfyUI workflow into a webpage a normal person can click

By ai-joe-git·Created 6 months ago·Updated 6 months ago· 0
ComfyUI WebUI Generator (Open)

      The name is doing a lot of work for a node that has exactly zero inputs and zero outputs. Drop WebUI_Generator_Launcher (displayed as "ComfyUI WebUI Generator (Open)") on the canvas and it looks like a dud - until you notice the two buttons that appear on it: Open Generator UI and Open ComfyUI Output Folder. That's the whole node. But behind those buttons lives the actual product: a bundled Gradio app that takes one of your ComfyUI workflows and turns it into a standalone HTML page - sliders, text boxes, a generate button - that talks to your ComfyUI's API and produces images. If you've ever built a workflow for someone who recoils at node graphs (a client, a friend, future-you on a tablet), this is that workflow, repackaged as a form.

      What it is

      WebUI_Generator_Launcher is a pure launcher in the utils category. INPUT_TYPES.required is empty, RETURN_TYPES is empty, it's not an output node - you don't wire anything into or out of it. The actual UI is injected from web/js/webui_generator.js, which adds the two buttons to the node when it's created. You place it, you click, and everything interesting happens in a separate browser window.

      The "Open Generator UI" button hits ComfyUI's /webui-generator/info route, learns where the bundled app is running, and opens it in a new tab. "Open ComfyUI Output Folder" POSTs to /webui-generator/open-output and pops open your ComfyUI/output directory in the file explorer (xdg-open on Linux, open on macOS, startfile on Windows).

      How it works

      When the pack loads, server.py immediately starts a background thread that launches the Gradio app (workflow_to_html_generator.py) on 127.0.0.1:7860 - the port A1111 used to want, so if something's squatting on it the code scans upward for the first free one. The node's run method just makes sure that thread is alive; starting it twice is a no-op.

      The Gradio app is where the real work happens. You upload an API workflow JSON, it pulls node definitions from ComfyUI's /object_info endpoint (ComfyUI has to be running for this), analyzes every input in the workflow, lets you pick which parameters to expose, and generates the standalone HTML - Bootstrap 5, dark mode, presets saved in localStorage, a gallery of the last 50 generations.

      Here's the neat part: the generated page doesn't touch Gradio again. It rebuilds the workflow JSON in the browser and POSTs it straight to your ComfyUI's /prompt endpoint, then polls for progress. The page is just a front end for the ComfyUI API.

      The gotchas

      The README lies a little. It describes a node called "Workflow → HTML (Generator)" with inputs like api_workflow_json_or_path, output_name, and comfy_base_url. The shipped code doesn't have those. The current node is the launcher button plus the separate browser UI - if you came looking for an input slot to paste JSON into, that's the mismatch. The upload happens in the Gradio window.

      Export the right format. This is the one that actually burns people. In ComfyUI use Export (API) from the menu, not a normal Save. The generator expects the API shape - a dict keyed by node id with class_type and inputs - not the UI workflow format with nodes/links arrays. Feed it the wrong format and it just won't parse.

      Mind the API's security posture. The generated page needs your ComfyUI API reachable from wherever it's opened, and that API is unauthenticated by default. Exposing it publicly means anyone who can reach it can run workflows on your machine. Keep these pages (and ComfyUI) off the open internet.

      Install

      Easiest via ComfyUI Manager - search comfyui-webui-generator-node. Or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/ai-joe-git/ComfyUI-WebUI-Generator-Node
      

      Then restart ComfyUI. Requirements are gradio>=4.0.0 and requests - gradio is a chunky first download if you don't already have it, and nothing here needs model files. It's pure tooling.

      Bottom line

      If your goal is "hand someone a button," this works and it's fully self-hosted - no SaaS, no accounts. The standalone HTML is the real value; the ComfyUI node is just the thing that launches the tool. It's niche and you won't find much buzz about it, and if you want the same trick with more polish there are services that consume API-format workflows (ViewComfy and friends). But if you want to package one workflow as a shareable webpage without signing up for anything, this is a reasonable DIY route - respect the security note and you're fine.

      Categoryutils

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs