Nodes/Endless ️🌊✨ Nodes/β™ΎοΈπŸŒŠβœ¨ String to Integer
ComfyUI Node

β™ΎοΈπŸŒŠβœ¨ String to Integer

Turning a Text Widget Into a Real Number ComfyUI Will Use

By tusharbhuttΒ·Created 3 years agoΒ·Updated about a year agoΒ· 68
β™ΎοΈπŸŒŠβœ¨ String to Integer
    • INT
    β—„StringValueβ–Ί

    The β™ΎοΈπŸŒŠβœ¨ String to Integer node is exactly one job, done plainly: take a string and hand you back an integer. In ComfyUI that's a more common need than it sounds. Batch numbers, CFG values, step counts - they all live in INT and FLOAT inputs, and if you're building a workflow where the value arrives as text (a dropdown, a saved prompt file, another node's string output), you need a converter to bridge the gap. This is that bridge.

    How it works

    It's a straight Python int() conversion wearing a node costume. The one input, StringValue, is a plain STRING field. Whatever you type there gets parsed and comes out the other side as an INT. No rounding, no tricks, no hidden options - the whole node is one input and one output.

    That simplicity is the point, but it's also the trap. The string has to actually be a number, or near enough that Python's int() accepts it. "42" works, " 42 " works (whitespace is fine), "4.2" does not - that's a float, and this node will error. Feed it "banana" and you get a parse error that shows up in the ComfyUI console. If you have any chance of a non-numeric string flowing in, it's worth guarding upstream.

    Inputs and outputs

    • StringValue (STRING) - the text to convert. Default is empty, so this is not a node you can forget to wire and get sensible results from.
    • INT output - the parsed integer. Wires straight into anything expecting an INT: a KSampler's steps, an Empty Latent Image's width/height, a seed.

    A word of caution about this node specifically

    This is one of the pack's legacy nodes. The Endless-Nodes pack was rebuilt from scratch in June 2025 - the author's own changelog says he "blew everything up and removed all the old nodes" - and the converter module these classes lived in is no longer in the repo. On a fresh install of the current version you may not find String to Integer in the menu at all, even though comfy.icu still lists it. If you loaded an old workflow that references it and it's missing, this is why. For the same job with a longer life ahead of it, grab something like the ESS String to X sibling (it gives you INT, FLOAT, and NUMBER from one input) or any of the ubiquitous string-to-int utilities from the bigger node packs.

    Installing the pack

    Install via ComfyUI Manager (search Endless Nodes) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tusharbhutt/Endless-Nodes
    

    Then restart ComfyUI. The nodes appear under the Endless 🌊✨ menu. One caveat that applies to the whole pack: it's a single hobbyist's personal project (GPL v3, "may or may not be maintained"), so test anything you rely on.

    CategoryEndless 🌊✨/Converters/String

    Inputs (1)

    NameTypeDefaultDescription
    StringValueSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    INTINTβ€”