Nodes/RF Nodes/To string (INT)
ComfyUI Node

To string (INT)

Put that seed in the filename, not just in your head

By foxtrot-roger·Created 3 years ago·Updated 2 years ago· 2
To string (INT)
    • STRING
    value

    The most useful number in any ComfyUI workflow is also the most forgettable: the seed. You know it matters, you know you'll want to reproduce the run, and then you close the window and it's gone. To string (INT) (RF_IntToString) turns an integer into text so you can paste it into a filename, a log line, or a graph note. It's the simplest member of the RF Nodes ToString family, and it exists because text is the only thing you can actually put somewhere.

    How it works

    Straight str() conversion. INT 1234567890 in, "1234567890" out. No formatting, no padding, no rounding - this family of nodes converts and stops. If you wanted a zero-padded seed or a fixed width, you'd need a formatting node, because this one deliberately doesn't.

    The inputs that matter

    • value - an INT, forceInput, so it must be wired from a node output (a seed, a step count, a batch index).

    Output: STRING - the integer as text.

    The pattern that's worth building

    The classic move: wire a seed into this node, concatenate the string with a Timestamp or a text node, and feed the result to a Save Image filename prefix. Now every output is named something like 20260811_143022_s1234567890.png - timestamped and seeded, reproducible from the filename alone. When you're running 200 images in a batch and want to rerun a specific one later, that's not a nice-to-have, it's the whole workflow.

    It also shows up in logs: if you're using the pack's Log nodes and want a seed embedded in the console line next to a value, stringify it and concatenate. Integers won't plug into a STRING input directly - that's the gap this node closes.

    Installing RF Nodes

    No dependencies, no models. Via ComfyUI Manager search "RF Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/foxtrot-roger/comfyui-rf-nodes
    

    Restart ComfyUI; it's under RF in the menu.

    Common issues

    • "It just returns the number as text?" - Yes. That's the entire job. If it seems trivial, you're not wrong, but "trivial" is exactly what you want from a converter that never surprises you.
    • "There's also an RF_ToString that takes ANY." - Right. Use this one when you want the INT socket specifically; use the ANY variant when you don't know the type yet.
    CategoryRF

    Inputs (1)

    NameTypeDefaultDescription
    valueINT

    Outputs (1)

    NameTypeDescription
    STRINGSTRING