Nodes/ComfyUI Deploy/External Number Int (ComfyUI Deploy)
ComfyUI Node

External Number Int (ComfyUI Deploy)

External Number, but integers only — steps, seeds, batch sizes

By BennyKok·Created 3 years ago·Updated 10 months ago· 1,529
External Number Int (ComfyUI Deploy)
    • value
    â—„input_idinput_numberâ–º
    â—„default_value0â–º
    â—„display_nameâ–º
    â—„descriptionâ–º

    Some numbers in a workflow are floats - denoise strength, CFG. Some are integers - steps, seed, batch size, width divided by something. If you're deploying a workflow and you want a caller to control a whole number without floating-point slop creeping into it, "External Number Int" is the node. It's the integer twin of External Number: same structure, same double-duty input_id, but it validates and returns an INT instead of a FLOAT.

    It exists because integer inputs deserve integer semantics. Steps of 20.0 from a float node usually still work, but it's the kind of sloppiness that bites eventually - a node that does strict integer math, a batch dimension that resents being a float, a seed that should be a clean int. This node keeps the contract honest: if it returns, you've got a whole number.

    How it works

    Same quirk as its float sibling, so let's be upfront: the value arrives through input_id, and the node parses it with an integer check - if input_id is empty or doesn't consist entirely of digits, it returns default_value; otherwise it returns int(input_id). In the editor, the node is a pass-through with an INT default; in a deployed run, ComfyDeploy injects the caller's number into input_id and the node turns it into an INT for the graph.

    Inputs and output

    • input_id - default input_number. The key callers use (and the value carrier, as above).
    • default_value - INT, default 0, roughly ±2.1 billion.
    • Optional: display_name, description.

    Output: value (INT).

    Installing it

    Same pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BennyKok/comfyui-deploy.git
    

    Restart ComfyUI, or install "ComfyUI Deploy" via ComfyUI Manager. No models, no key.

    Where people get burned

    The digit-only check is the sharp edge here, and it's subtler than it looks: isdigit() returns false for negative numbers and anything with a decimal point. So -1 or 4.5 in input_id fails the check and silently falls back to default_value - no error, just the default. If a caller sends a negative seed or a float where you expect an int and the output looks wrong, this is usually why. If your API legitimately needs negatives or decimals, use External Number instead and cast downstream.

    And same as its sibling: don't hand-edit input_id to a test value. It parses, it looks like it's working, and then you've renamed the API key out from under your deployment. Keep input_id as the key, set the default for fallback, and let the backend do its thing.

    Category🔗ComfyDeploy

    Inputs (4)

    NameTypeDefaultDescription
    input_idSTRINGinput_number—
    default_valueoptINT0-2147483647–2147483647—
    display_nameoptSTRING—
    descriptionoptSTRING—

    Outputs (1)

    NameTypeDescription
    valueINT—