Gen2 Output Panel
Stop fishing OUTPUT_* constants out of the API export
- PANEL_LINK
- param_0
- param_1
- param_2
- param_3
- param_4
- param_5
- param_6
- param_7
- param_8
- param_9
- param_10
- param_11
- param_12
- param_13
- param_14
- param_15
- param_16
- param_17
- param_18
- param_19
- param_20
- param_21
- param_22
- param_23
- param_24
- param_25
- param_26
- param_27
- param_28
- param_29
- param_30
- param_31
If you drive ComfyUI as a backend - a frontend app, a bot, a script that posts a prompt and reads /history - you know the pattern: a workflow littered with OUTPUT_* constant nodes you have to name, find by title in the exported JSON, and parse by hand. This node replaces that whole chore with one configurable panel. It's the "where do the results land" half of the Gen2 API panel pair.
What it does
Click Configure and define named, typed outputs: STRING, INT, FLOAT, BOOLEAN, IMAGE - up to 32 of them. Each name becomes a typed input slot on the node body and the key in the result document. You wire whatever a workflow produces into those slots, and when the run finishes the panel publishes one clean JSON document with everything in it.
Two details worth knowing:
- IMAGE outputs get saved to the output folder and their filenames/URLs come back via
/history, exactly like SaveImage. You don't get a tensor back over the wire - you get files you can fetch. PANEL_LINKis how it finds its input side. The tooltip says it plainly: connect it from a Gen2 Input Panel and the result document also carries the input schema and the latest input values. That's how your backend knows what parameter names the workflow accepts, without scanning node titles.
Inputs and the result document
The schema shows _config (a STRING holding the serialized JSON of your configured params, default "[]"), PANEL_LINK (the wildcard link from the Input Panel), and a bank of optional wildcard param_0 through param_31 slots the frontend renames for you. There are no outputs - this is an output node, the end of the wire.
The result document is versioned and structured:
{
"version": 1,
"inputs": {"schema": [...], "latest_values": {...}},
"outputs": {"schema": [...], "latest_values": {...}}
}
You'll also get a read-only JSON schema textbox on the node body - populated from the paired Input Panel's config after a run, with a Copy button. Handy when you're writing the schema down for an external client and don't want to eyeball raw JSON.
How it's built (so you know what it needs)
The backend uses ComfyUI's V3 node API (io.ComfyNode with accept_all_inputs=True), and the Configure popup / dynamic slots come from a frontend extension shipped via WEB_DIRECTORY. It works on both the legacy LiteGraph canvas and the Nodes 2.0 (Vue) frontend. Requires ComfyUI ≥ v0.10.0; the author tests against v0.10.0 and v0.26.0. If you're on an ancient ComfyUI, update first.
Installation
ComfyUI Manager, search "ComfyUI-gen2", install and restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/petmycat/ComfyUI-gen2
cd ComfyUI-gen2
pip install -r requirements.txt
The API section needs no model downloads and no extra Python packages (the scipy in requirements.txt is for the tiling section).
Common issues
- Empty schema textbox.
PANEL_LINKisn't connected. The schema is carried over the panel link - no link, no schema. - Image outputs missing from the document. If a configured IMAGE slot gets no tensor (left unwired), the node records
nullrather than failing the run. Check your wires before blaming the panel. - Old ComfyUI. V3
io.ComfyNodeclasses are a recent thing; on anything below v0.10.0 the node won't register at all.
It's a quality-of-life node in the best sense - nothing it does is impossible with core ComfyUI, it just makes the API-driven workflow a lot less fragile.
Inputs (34)
| Name | Type | Default | Description |
|---|---|---|---|
| _config | STRING | [] | — |
| PANEL_LINK | * | Connect from a Gen2 Input Panel to include input schema and latest values. | |
| param_0opt | * | — | |
| param_1opt | * | — | |
| param_2opt | * | — | |
| param_3opt | * | — | |
| param_4opt | * | — | |
| param_5opt | * | — | |
| param_6opt | * | — | |
| param_7opt | * | — | |
| param_8opt | * | — | |
| param_9opt | * | — | |
| param_10opt | * | — | |
| param_11opt | * | — | |
| param_12opt | * | — | |
| param_13opt | * | — | |
| param_14opt | * | — | |
| param_15opt | * | — | |
| param_16opt | * | — | |
| param_17opt | * | — | |
| param_18opt | * | — | |
| param_19opt | * | — | |
| param_20opt | * | — | |
| param_21opt | * | — | |
| param_22opt | * | — | |
| param_23opt | * | — | |
| param_24opt | * | — | |
| param_25opt | * | — | |
| param_26opt | * | — | |
| param_27opt | * | — | |
| param_28opt | * | — | |
| param_29opt | * | — | |
| param_30opt | * | — | |
| param_31opt | * | — |
Outputs (0)
No outputs