ComfyUI Node Runs on cloud

int

A whole number, in every type ComfyUI knows

By TinyTerraΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 604
int
    • int
    • float
    • text
    β—„int0β–Ί

    This is the other half of tinyterra's number-converter pair (float does the mirror-image job). int takes one whole number and gives it back to you as an INT, a FLOAT, and a STRING - because ComfyUI won't let you plug a string into an integer socket or an int into a float socket, and sometimes you want the same value in two or three of them at once.

    It's the kind of node you don't appreciate until you need it: you set one value, and the same number drives a seed, a strength readout, and a bit of text in a filename without you typing it three times.

    When you'll actually use it

    • Seeds everywhere. ComfyUI's sampler inputs take INT seeds; several of the tinyterra pipe samplers let you override the seed with a noise_seed. If you're building a workflow where the same seed should flow into multiple places, this node gives you a single knob.
    • A number inside a prompt or filename. The text output feeds text nodes, or the pack's filename prefix parsing, so your filename can carry the actual value used.
    • Feeding an INT into something that wants FLOAT. Some nodes want the decimal form of a whole number; the float output covers that without an extra conversion node.

    The inputs and outputs

    • int - the only input. Whole numbers from 0 up (no negatives), defaulting to 0.
    • int (output) - passed straight through.
    • float (output) - the number as a float (7 becomes 7.0).
    • text (output) - the number as a string ("7").

    The conversions are direct Python casts, so a float output is exact (integers convert cleanly to floats) and the text output has no formatting surprises. If you want to change the value rather than just re-type it, that's a different tool - this one only converts.

    Installing it

    int ships in the tinyterraNodes pack, so it's one install for the whole family:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes
    

    or install "tinyterraNodes" from ComfyUI Manager, then restart. No pip packages, no model downloads - the pack is pure Python plus its UI scripts. The node sits under 🌏 tinyterra/util.

    Honestly, you could replicate this with ComfyUI's built-in primitives in two nodes. The point is not that it's magical - it's that it's one node, sitting in the same menu as the rest of the pack, saving you a bit of clutter on every workflow that needs a number in more than one type.

    Category🌏 tinyterra/util

    Inputs (1)

    NameTypeDefaultDescription
    intINT00–18446744073709550000β€”

    Outputs (3)

    NameTypeDescription
    intINTβ€”
    floatFLOATβ€”
    textSTRINGβ€”