Nodes/WebApp API/Selection input
ComfyUI Node

Selection input

WebApp Selection input

By MonkeyProof-Solutions-BV·Created 6 months ago·Updated 3 months ago· 2
Selection input
  • parent
  • Option index
  • full_value
  • value
  • Order + 1
value_in
options
default
full_options
maximum1
order10
advancedfalse
value_from_interface
tooltip

The dropdown is the workhorse of any form, and WebApp_Selectioninput is this pack's version: the control that lets your app users pick from a fixed list - aspect ratios, checkpoint names, style presets, anything that shouldn't be free text. It's the most feature-complete of the input nodes, with multi-select, a "hidden full value" trick, and three outputs that give you the pick three different ways.

Same pack model as all the controls: you define it as a node in your ComfyUI graph, export the workflow API, and a framework like Simian WebApps renders the real dropdown and sends the selection back.

The inputs that matter

  • options (STRING, multiline) - the selectable choices, new-line separated. One option per line.
  • default (STRING) - the option pre-selected when the app loads.
  • full_options (STRING, multiline) - this is the clever one. You can show users a short, readable string but pass a full, more complex value downstream. One full_options entry per options line, and the selected item's hidden full string is what flows out the full_value output. So the app shows "SDXL" while the workflow gets "stabilityai/stable-diffusion-xl-base-1.0".
  • maximum (INT, default 1) - how many items can be selected at once. Set it above 1 and you get a multi-select; the outputs become lists of the picked values.
  • value_in (COMBO) - the value used when running the workflow in ComfyUI. In the canvas this is a dropdown widget; the pack's front-end JS turns your options text into that widget so you can test locally.

The outputs

  • Option index (INT, a list) - the index of each selected option in the options list.
  • full_value (STRING, a list) - the hidden full string for each selection.
  • value (STRING, a list) - the selected option text itself.
  • Order + 1 (INT) - the usual auto-sequence chain slot.

advanced, parent, tooltip, and value_from_interface behave like the rest of the pack.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/MonkeyProof-Solutions-BV/ComfyUI_webapp

Restart ComfyUI, or use ComfyUI Manager → search ComfyUI_webapp ("WebApp API"). No models, no keys; dependencies are pillow and torch only.

Gotchas

Two real ones. First, full_options must line up with options - if the counts don't match, the node can't map the selection and full_value comes back as [None]. Keep them in the same order and same length. Second, the pack's version caveat: it's built on the newer backend node API (comfy_api.latest), so a stale ComfyUI won't load it. Update ComfyUI first, then check your option lists.

Categoryapi/app

Inputs (10)

NameTypeDefaultDescription
value_inCOMBOThis value is used when running the workflow in ComfyUI.
optionsSTRINGWeb app selectable options. New line separated.
defaultSTRINGDefault selected option
full_optionsSTRINGFull strings hidden behind selectable, shorter strings.
maximumINT1Number of items that may be selected at the same time.
orderINT10Control order in its section. Lowest value at the top. Highest at the bottom.
advancedoptBOOLEANfalseControl is only shown when advanced is True.
value_from_interfaceoptSTRINGTo be used when modifying the workflow API json from an external interface. Note that this string is interpreted as a json string.
parentoptPARENTWeb app parent to add the node to.
tooltipoptSTRINGWeb app control tooltip.

Outputs (4)

NameTypeDescription
Option indexINTThe indices of the selected values.
full_valueSTRINGFull selected value.
valueSTRINGOutput value.
Order + 1INTOrder number for the next control.