Schema Integer Parameter
Whole numbers with a contract for your agent
- value
Seeds, dimensions, batch counts, steps, iterations - half the numeric knobs in a ComfyUI workflow are whole numbers, and when an agent is driving the graph it needs to know which of those it's allowed to touch and within what range. That's this node: a typed INT field with bounds your tool can validate against before a run, instead of the agent blindly shoving -42 into a seed and hoping.
It's one of the eight parameter nodes in ComfyUI_SchemaNodes. All of them share the same base fields - name, io_kind (input/output), description, required - and the integer node is where you'll see the numeric constraint machinery at its cleanest.
The inputs that matter
name/description- same contract-writing advice as everywhere in this pack: a stable identifier and a description written for a machine to read.io_kind-inputsays the agent supplies this before the run;outputlets another node's result (a count, a chosen seed) be surfaced as a deliverable.default- the fallback when nothing is wired in.ge,gt,le,lt- the guardrails: greater-or-equal, greater-than, less-or-equal, less-than. These map directly to JSON Schemaminimum,exclusiveMinimum,maximum,exclusiveMaximum. The defaults are the int32 extremes (-2147483648 / 2147483647), which is the pack's way of saying "not set" - if you leave them alone, they're not added to the schema at all. So you don't have to clear them; you just set the ones you care about.multiple_of- a value like 8 forces the field to land on multiples of 8 (handy for latent-friendly resolutions). It maps to JSON SchemamultipleOf.value_in(INT, forced input) - wire something in and it overridesdefault, the same override pattern every node in this pack uses.
How it works
Execution is boring in the best way: it resolves value to value_in or default, coerces to int, and hands it down the graph as a plain INT. The interesting part is what your tool sees. When an agent parses the workflow JSON, it reads those widget values and builds a JSON Schema fragment - "type": "integer", "minimum": 512, "maximum": 2048, "multipleOf": 8 - and can validate the value before sending it to the API. That's the whole point of the pack: you're not just labeling a knob, you're publishing its contract.
The node always executes too - the base class sets IS_CHANGED to a NaN sentinel, so ComfyUI never skips it as "unchanged." For a parameter node that's what you want: the current value always flows through.
Installing it
Same story as the rest of the pack - one install gets you all eight nodes.
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 files, no API keys. The code only touches libraries ComfyUI already bundles.
Common gotchas
- Don't rely on the node to enforce bounds at runtime. The
ge/gt/le/ltconstraints are metadata for whoever parses the workflow - the node itself won't clamp or reject a wired-in value that violates them. If you're injecting values viavalue_in, your tool is the enforcement point. - The "not set" sentinel can bite you if you copy workflows blindly.
gedefaults to int32-min andleto int32-max, so an untouched node emits no minimum/maximum at all. That's correct behavior, but it means "I didn't see a range" does not mean the field is unconstrained by intent - it's just unconstrained. - A seed that's
outputmode is weird but useful. Wire a seed picker into it and the agent gets the actual seed used back as a result, which matters if you're doing reproducibility bookkeeping on a batch run.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | parameter_name | — |
| io_kind | COMBO | input | 2 options: input, output |
| description | STRING | — | |
| required | BOOLEAN | true | — |
| default | INT | 0-2147483648–2147483647 | — |
| ge | INT | -2147483648-2147483648–2147483647 | — |
| gt | INT | -2147483648-2147483648–2147483647 | — |
| le | INT | 2147483647-2147483648–2147483647 | — |
| lt | INT | 2147483647-2147483648–2147483647 | — |
| multiple_of | INT | 00–2147483647 | — |
| value_inopt | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | INT | — |