Nodes/ComfyUI-JDCN/LogicUtil_Static Number Int
ComfyUI Node

LogicUtil_Static Number Int

A named constant for whole numbers, so you stop hunting sliders

By daxcay·Created 2 years ago·Updated about a year ago· 160
LogicUtil_Static Number Int
    • INT
    number0

    LogicUtil_Static Number Int is a one-trick node, and the trick is "hold a whole number and give it back on demand." One number input, one INT output, zero behavior beyond that. It lives in the LogicUtil subpack of ComfyUI-JDCN, and while it's the least impressive thing in the pack on paper, constant nodes like this earn their keep in any workflow you plan to reuse.

    When a constant node is actually worth it

    You can type an integer into almost any ComfyUI widget, so why bother with a dedicated node? Because the same number tends to show up in several places, and each place is a different widget you have to remember to update together.

    Say you're running a workflow where the batch size, a seed offset, and a steps value all need to move together. Wire them all from one LogicUtil_Static Number Int and you change one node. That's the whole value proposition - a single source of truth. It's the exact habit the community preaches with seeds ("lock the seed, change one variable, compare"), applied to constants: when a number is deliberately fixed, make it visibly fixed in one labeled spot.

    It also plays nicely with the pack's other LogicUtil nodes. Feed the INT output into a random or iterator node, or use it as the index for a list-picking node - having a stable typed socket instead of an unlabeled widget keeps the graph readable.

    The only input that matters

    number, an INT with a default of 0. Type your value, wire the INT output to anything expecting a whole number - steps, batch count, seeds, indices. ComfyUI will coerce it for most float sockets too, though for fractional values you'd want the pack's float variant instead.

    One thing it is not: a variable. There's no memory or state, so it can't be updated mid-run by another node. If you need a number that changes per queue run, look at LogicUtil_Uniform Random Int (random) or the yieldable iterator (sequential) in the same pack. The static node is for the values that should stay static.

    Installing it

    It comes as part of ComfyUI-JDCN, so one install covers all the LogicUtil nodes. Easiest via ComfyUI Manager: Install Custom Nodes → search "JDCN", install, restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/daxcay/ComfyUI-JDCN.git
    cd ComfyUI-JDCN
    pip install -r requirements.txt
    

    The only dependency is piexif - no models, no GPU work, nothing heavy. It's a small two-person hobbyist pack (Daxton Caylor and Jerry Davos), and the Static nodes are the "obvious but handy" corner of it. There's genuinely nothing to get wrong here: put in a number, get out a number. Sometimes the best node is the one you never have to think about.

    CategoryLogicUtil

    Inputs (1)

    NameTypeDefaultDescription
    numberINT0

    Outputs (1)

    NameTypeDescription
    INTINT