Nodes/ComfyUI-aihub-workflow-exposer/AIHub Workflow Controller
ComfyUI Node

AIHub Workflow Controller

The ID Card Every Exposed AIHub Workflow Needs — AIHub Workflow Controller

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Workflow Controller
      idmy_custom_workflow
      labelmy_custom_workflow
      description
      categorymy_custom_workflow
      contextimage
      project_type
      project_type_init

      The AIHub Workflow Controller doesn't process a single pixel. It has no outputs at all. What it does is make your workflow real to the AIHub server - it's the registration form, the ID card, and the menu entry for a workflow that's meant to be driven by an outside application.

      Here's the context, because this node makes no sense without it. The ComfyUI-aihub-workflow-exposer pack exists to let image, video, and audio editors treat ComfyUI as a plugin backend. A client like GIMP connects to your ComfyUI instance over a websocket, sends in data (the current layer, the merged image, a prompt) through the pack's Expose nodes, runs your workflow, and gets results back through Action nodes. The pack's stated goal is genuinely nice: let less-expert people use AI inside tools they already know, without needing a powerful machine or a node graph in front of them. You build the workflow once; the editor becomes the UI.

      The Controller is the anchor for all of that. Exactly one of these must sit in any workflow you want to expose - the source comments call it "a necessary piece," and the server won't register a workflow that doesn't carry one. Its job is to tell the client what your workflow is called, what category it lives under, and what context it works in.

      How it works

      When you hit Validate Workflow, the node checks the graph against the AIHub protocol. When you hit Export to AIHub workflows, it validates, then writes the workflow JSON into ComfyUI/aihub/workflows/, keyed by the id you set. That folder is what the server reads and serves to clients - a workflow only shows up in the editor's menu after it's been exported. The export is handled by the pack's JavaScript (export-workflow.js), which scans the graph for a AIHubWorkflowController node, grabs its id, and posts the API-format JSON to the server's /aihub_workflows endpoint. That's also why the id matters so much: it's the filename, the URL, and the identity the client will invoke.

      The fields that matter

      Most are self-explanatory metadata, but a few deserve a closer look:

      • id - must be unique across all exposed workflows. The client routes on it, so two workflows sharing an id will fight. Keep it alphanumeric with underscores; the validator enforces 3–50 characters.
      • label - the human-readable name shown in the client's menu. Make it something a non-expert actually understands, since that's the whole point of the pack.
      • category - a menu path, /-separated, so you can group workflows under something like photo/retouch.
      • context - one of image, video, audio, 3d, text. Tells the client which editor types your workflow fits.
      • project_type and project_type_init - only for multi-step "projects" (the README's example is LTX-Video, where latent files need to be stored between workflow runs so a video can be built step by step). project_type limits the workflow to a project of that type; project_type_init marks this workflow as the one that starts a fresh project. Total overkill for a simple image workflow - leave them blank.

      Description has a multiline box for the client-facing text. Minor source quirk worth knowing: its tooltip reads "The noise to use." - a copy-paste hangover from a sampler node. It's cosmetic; the field works fine, but it's a good reminder this is a small, active project rather than a polished commercial one.

      Installing and troubleshooting

      You can't install this node alone; it comes with the whole pack. Search "ComfyUI-aihub-workflow-exposer" in ComfyUI Manager, or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
      

      Then restart. No requirements.txt, no model downloads - the pack uses only what ComfyUI ships internally. It does need the ComfyUI/aihub/ directory tree to exist (at minimum workflows, models, loras, plus locale subfolders), because the server and export flow read and write there. If the folders aren't there, exports fail or go nowhere.

      Where people get burned: a workflow that isn't showing up in the client almost always has no Controller node, a missing export, or a duplicate id. And remember - this pack is aimed at advanced setups. It expects you to be the one who adapts workflows, configures exposes, and runs the ComfyUI instance the editor connects to. If that's not you yet, the Controller can wait until the rest of the AIHub story is in place.

      Categoryaihub/workflow

      Inputs (7)

      NameTypeDefaultDescription
      idSTRINGmy_custom_workflowThe id for the workflow, must be unique among all the workflows
      labelSTRINGmy_custom_workflowThe label for the workflow to be used
      descriptionSTRINGThe noise to use.
      categorySTRINGmy_custom_workflowA path to be used within the menu, separated by /
      contextCOMBOimageThe context of this workflow
      project_typeSTRINGThe project type is an arbitrary string that limits in which context the workflow can be used
      project_type_initBOOLEANThis workflow can initialize the given project type, provided an empty project folder

      Outputs (0)

      No outputs