ComfyUI Node

Int to String

Turn a Number Into Text in ComfyUI (Int to String)

By kadirnar·Created 3 years ago·Updated 7 months ago· 25
Int to String
    • text
    value0

    Int to String converts an integer to text, full stop. It's a five-line utility node and the sort of thing you'd normally do with a formatting widget - but if you've ever needed to drop a seed or a step count into a filename, a log, or a prompt, you know exactly why it exists. In ComfyUI, numbers and text live in different wire types, and sometimes you just need the bridge.

    The implementation is str(value) and nothing else - no padding, no thousand separators, no hex, no formatting options. 42 becomes "42". It's deliberately boring, and for a type-conversion node that's a feature.

    The input and output

    • value - an INT input, default 0. Wire it from any node outputting an integer - a seed, a batch size, a step count.

    The output is text, a single STRING. From there it goes wherever strings go: a display node, a prompt-builder, a filename-saver.

    How to install it

    Standard pack install - ComfyUI Manager (search "ComfyUI-Transformers") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kadirnar/ComfyUI-Transformers
    

    Restart ComfyUI. No model, no download, no GPU - this is pure Python, instant, and it works offline. It's also the same underlying utility family as the pack's Float to String (plus the reverse String to Int / String to Float converters).

    Where people get burned

    There's not much to get burned on, honestly - that's the point of this node. The only real "gotcha" is that many text-formatting and display nodes already accept numbers and will convert them for you, so Int to String often gets added when it isn't strictly needed. And if you're hoping for zero-padded numbers ("0007") or any kind of formatting, it won't do it - you'd want a proper text-format node for that. As a straight type converter, it does one thing and does it exactly.

    CategoryTransformers/Utility

    Inputs (1)

    NameTypeDefaultDescription
    valueINT0

    Outputs (1)

    NameTypeDescription
    textSTRING