AIHub Expose Integer
One number from the client, well-mannered
- INT
AIHub Expose Integer is the boring, dependable workhorse of the AIHub Workflow Exposer pack. Where the image and model exposes are doing clever canvas geometry and checkpoint juggling, this one just says: "the external app will give me a whole number, and here it is." You wire its INT output into anything that wants a count - CFG… no, not that, an integer: denoise steps, seed-ish values, batch sizes, how many frames to generate, a ControlNet start/end percentage's denominator. Anywhere a client-driven workflow needs a knob that isn't a float or a boolean.
It's part of the same architecture as every AIHubExpose* node: the value isn't typed in the ComfyUI UI at all. When an AIHub client (an image/video/audio editor plugin speaking the protocol over the pack's websocket on port 8111) runs your workflow, it supplies this field's value and the node just passes it through. Standalone in the web UI, it sits there with its defaults. That's expected.
The inputs that matter
- min / max / step / value - the range, the increment, and the default (which doubles as "the current value"). The client's UI renders these as a proper slider/spinner, so setting a sane range is how you keep a beginner from asking for
-9999steps. - id - unique per workflow; the protocol addresses this field by it. Alphanumeric plus
_and-only. - label - what the client shows the user. "Steps" beats "exposed_integer".
- advanced - check this to bury the option behind an "advanced" reveal in the client UI. Perfect for the knob you expose only so power users can find it.
- index - sort order when the client lays out all exposed fields; lower numbers float to the top.
The clever part: linked bounds
Two inputs do something you don't see in a stock number node: min_expose_id and max_expose_id. Put the id of another exposed integer in there and this node's min or max will track that other value live, with min_expose_offset/max_expose_offset letting you nudge it. So if you expose "total frames" and then an integer that means "frames to skip," you can pin the latter's max to total_frames and the client physically can't pick an out-of-range value. That's the kind of guardrail that matters when the person on the other end doesn't know or care what a latent is.
Install & gotchas
Install via ComfyUI Manager (search ComfyUI-aihub-workflow-exposer) or:
cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
then restart. No requirements.txt, no model downloads - it only uses what ComfyUI already ships. The usual AIHub folders (ComfyUI/aihub/...) and an AIHubWorkflowController in the workflow are expected before a client will talk to you.
One thing people trip on: because value is both the default and the current value, it's what a client sees until it sends something. So don't set a placeholder default of 0 for something like steps unless 0 is actually legal - the README's own AIHubExposeSteps exists partly because model defaults and step counts get tangled. For a plain integer, just pick a default you'd be happy running with.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | exposed_integer | A unique custom id for this workflow (it should be unique) |
| label | STRING | Exposed Integer | This is the label that will appear in the field |
| tooltip | STRING | An optional tooltip | |
| min | INT | 0-2147483648–2147483647 | — |
| min_expose_id | STRING | The id of another exposed integer to use its value as the min value for this integer | |
| min_expose_offset | INT | 0-1000–1000 | An optional offset to add to the exposed min value |
| max | INT | 100-2147483648–2147483647 | — |
| max_expose_id | STRING | The id of another exposed integer to use its value as the max value for this integer | |
| max_expose_offset | INT | 0-1000–1000 | An optional offset to add to the exposed max value |
| step | INT | 1-2147483648–2147483647 | — |
| value | INT | 10-2147483648–2147483647 | — |
| advanced | BOOLEAN | false | If set to true, it will make this option be hidden under advanced options for this workflow |
| index | INT | 0 | this value is used for sorting the input fields when displaying, lower values will appear first |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |