Schema Enum Parameter
A dropdown for your agent (the node itself is just a text box)
- value
Some workflow inputs aren't a range, they're a menu: which sampler, which upscaler, which aspect-ratio preset, which LoRA. An agent guessing at euler_ancestral has no idea it should be picking from a fixed list - unless your workflow declares the list. That's what this node is for: an enum parameter whose choices become part of the machine-readable contract, so the agent's tooling renders an actual dropdown for it.
The one thing that surprises people: the node in your graph is not a dropdown. It's a text field for typing options, one per line, plus a text field for the default. The dropdown exists on the other side - your tool reads the options list and renders it for the agent. The node is the declaration; the menu is downstream. That distinction is the whole design of ComfyUI_SchemaNodes, and it's worth internalizing before you go looking for a combo widget that isn't there.
The inputs that matter
options- one choice per line:
This becomes the JSON Schemaeuler euler_ancestral dpmpp_2m dpmpp_sdeenumarray. Order matters - it's the order your tool will render.default- which option wins when nothing is wired in. Keep it to one of the listed options, or you've got a field that can emit a value the schema says is impossible.allow_custom_value- settrueto let the agent pass a value that's not in the list. Useful for "yes, but also maybe a custom filename" cases; otherwise your tool should validate strictly against the enum.name/description- the usual stable-identifier and machine-readable-description advice. For an enum, the description is where you explain when to pick which option.io_kind-inputfor agent-supplied choices,outputif you want to surface a selected option (like the sampler actually used) as a result.value_in(STRING, forced input) - the override, same as every node in this pack.
How it works
At runtime it resolves value = value_in or default, does a bit of newline/whitespace cleanup on the options list, and returns the value as a plain STRING on the value output - it plugs straight into a KSampler's sampler_name or a UpscaleModelLoader-adjacent selector. The node does not validate that the resolved value is in the list; allow_custom_value is metadata for the tooling, not a runtime gate.
One note on the README: it still describes a SCHEMA_FIELD output on these nodes, but the current code removed it (commit 8e5676d). You get one value output. The enum declaration - type: string, enum: [...], default: ... - lives in the widget values inside the workflow JSON, which is exactly where a parser reads it from.
Installing it
Same as the rest of the pack.
cd ComfyUI/custom_nodes
git clone https://github.com/Liquid-XO/ComfyUI_SchemaNodes
Restart ComfyUI, or install via ComfyUI Manager (search "ComfyUI SchemaNodes"). No pip dependencies, no model downloads, no API keys.
Common gotchas
- Don't set a
defaultthat isn't inoptions. The node won't stop you, but you've handed your tool a schema where the default violates the enum - the exact kind of inconsistency that makes agents produce nonsense. - The enum is only as good as your options list. This is the node where sloppy input hurts most. Type
dpmpp_2mwith a trailing space and you've silently got a different value in the schema. Keep options trimmed and exact. allow_custom_value=truedefeats the point unless you mean it. If you're trying to constrain an agent, leave it off; it exists for genuinely open-ended-but-mostly-fixed fields, and a strict enum is a much better agent UX in practice.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | parameter_name | — |
| io_kind | COMBO | input | 2 options: input, output |
| description | STRING | — | |
| required | BOOLEAN | true | — |
| options | STRING | option_a option_b | — |
| default | STRING | option_a | — |
| allow_custom_value | BOOLEAN | false | — |
| value_inopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | STRING | — |