ComfyUI Node

AIHub Expose Float

A float slider you expose to the client — with min/max that follow other fields

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Float
    • FLOAT
    idfloat
    labelFloat
    tooltip
    min0.00
    min_expose_id
    min_expose_offset0.00
    max1.00
    max_expose_id
    max_expose_offset0.00
    step0.050
    value0.50
    advancedfalse
    index0
    sliderfalse

    AIHub Expose Float is the general-purpose decimal input of this pack's expose family. The client's UI shows it as a number field or slider, the user drags it, and the value flows into your workflow as a FLOAT output. Where it gets interesting is the boundaries: the min and max can be linked to other exposed floats, so one field's range can depend on another value in the same run. That's a level of input hygiene you don't get from a plain widget - it's the difference between "enter any number" and "this can't exceed the max you just picked."

    It's part of otavanopisto's ComfyUI-aihub-workflow-exposer, the pack that lets external apps drive ComfyUI as their generation engine. Expose nodes are the inputs: the client sends values over the pack's own websocket (port 8111), and the node validates and passes them into the graph.

    How it works

    The client sends the float; the node checks it's within the min/max (and raises a ValueError naming the field if it isn't) and returns it. The dynamic range is the neat part: min_expose_id and max_expose_id let you name another exposed float's id to borrow its value as this field's boundary, with optional offsets. So a "width" field could be constrained by an exposed "canvas width" minus a margin, and if the canvas width changes, the constraint follows.

    The inputs that matter

    • id / label / tooltip - the usual expose metadata; id is the contract with the client and with condition expressions.
    • min / max / step - the static range and increment (defaults 0..1, step 0.05). Set step to something human, like 0.05 or 0.1, or you'll drive users mad with 0.0499999 values.
    • value - the default (default 0.5). The node errors if the default sits outside min/max, so when you change a bound, check the value still fits.
    • min_expose_id / max_expose_id - the ids of other exposed floats to use as dynamic bounds. Leave empty for static bounds.
    • min_expose_offset / max_expose_offset - added to the dynamic bound (e.g. max = other_float + 1).
    • slider - if true, the client renders it as a slider rather than a numeric field.
    • advanced / index - UI placement.

    The output

    • FLOAT - the validated value, wire it anywhere a float is expected.

    Installing it

    ComfyUI Manager (search "ComfyUI-aihub-workflow-exposer"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    # restart ComfyUI
    

    No requirements, no downloads.

    Where people get burned

    The dynamic bound fields are the trap: they reference expose ids, and if the id you type doesn't exist (or belongs to a field the client doesn't expose), the bound silently doesn't apply. Spell them exactly, and mind the offsets - a min_expose_offset applies to a min, a max_expose_offset to a max, and mixing them up produces ranges that look right and behave wrong. And as with all expose nodes, the stock UI shows you a plain widget with a default; the real, wired-up input happens when a client is connected.

    Categoryaihub/expose

    Inputs (14)

    NameTypeDefaultDescription
    idSTRINGfloatA unique custom id for this workflow.
    labelSTRINGFloatThis is the label that will appear in the field.
    tooltipSTRINGAn optional tooltip.
    minFLOAT0.00-100000000000000000000–100000000000000000000
    min_expose_idSTRINGThe id of another exposed float to use its value as the min value for this float
    min_expose_offsetFLOAT0.00-1000–1000An optional offset to add to the exposed min value
    maxFLOAT1.00-100000000000000000000–100000000000000000000
    max_expose_idSTRINGThe id of another exposed float to use its value as the max value for this float
    max_expose_offsetFLOAT0.00-1000–1000An optional offset to add to the exposed max value
    stepFLOAT0.0500.001–1The step value for the float input.
    valueFLOAT0.50-100000000000000000000–100000000000000000000
    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.
    sliderBOOLEANfalseIf set to true, this float will be represented as a slider in the UI.

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT