ComfyUI Node

AIHub Expose Integer

One number from the client, well-mannered

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Integer
    • INT
    idexposed_integer
    labelExposed Integer
    tooltip
    min0
    min_expose_id
    min_expose_offset0
    max100
    max_expose_id
    max_expose_offset0
    step1
    value10
    advancedfalse
    index0

    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 -9999 steps.
    • 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.

    Categoryaihub/expose

    Inputs (13)

    NameTypeDefaultDescription
    idSTRINGexposed_integerA unique custom id for this workflow (it should be unique)
    labelSTRINGExposed IntegerThis is the label that will appear in the field
    tooltipSTRINGAn optional tooltip
    minINT0-2147483648–2147483647
    min_expose_idSTRINGThe id of another exposed integer to use its value as the min value for this integer
    min_expose_offsetINT0-1000–1000An optional offset to add to the exposed min value
    maxINT100-2147483648–2147483647
    max_expose_idSTRINGThe id of another exposed integer to use its value as the max value for this integer
    max_expose_offsetINT0-1000–1000An optional offset to add to the exposed max value
    stepINT1-2147483648–2147483647
    valueINT10-2147483648–2147483647
    advancedBOOLEANfalseIf set to true, it will make this option be hidden under advanced options for this workflow
    indexINT0this value is used for sorting the input fields when displaying, lower values will appear first

    Outputs (1)

    NameTypeDescription
    INTINT