Nodes/RiceRound Cloud Node/RiceRound Str To Int
ComfyUI Node

RiceRound Str To Int

Turn text into a whole number

By RiceRound·Created 2 years ago·Updated about a year ago· 22
RiceRound Str To Int
    • value
    name数值
    str

    Same shape as RiceRoundStrToFloatNode, just for whole numbers: this node takes a STRING and converts it into an INT, for the case where the value you need - a step count, a seed, a width - is already text somewhere in your graph rather than sitting in a native integer widget. Chain it after RiceRoundInputTextNode or a wildcard BASIC output and you get back a real INT you can wire into anything expecting one.

    The one genuine quirk worth knowing

    Its schema marks is_output_node as true, which its Float and Boolean siblings don't share - a small, honest inconsistency in the pack's metadata rather than something that should change how you use it. In ComfyUI, that flag makes a node execute even when nothing downstream is consuming its output; it doesn't stop you from wiring the resulting INT onward too. Practically: don't read anything special into it, and don't assume this node is somehow a dead end just because that flag is set on it.

    The inputs and output that matter

    • name (STRING, default "数值" - "value/number" in Chinese) - the label for this field, worth overriding if your audience isn't Chinese-speaking; the pack's defaults ship that way throughout.
    • str (STRING) - the text being converted.
    • Output: value (INT) - the parsed number.

    Same gap as its Float sibling: there's no min/max on this node, unlike RiceRoundIntNode's native version, which does have bounds. Whatever the string parses to is what comes out, unbounded.

    Installing it

    Through ComfyUI Manager: search "RiceRound," install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RiceRound/ComfyUI_RiceRound
    

    then restart ComfyUI. The README lists no dependencies or model downloads for this pack - it's a packaging and upload layer, not a generation one, so install is quick regardless of which node in it you're after.

    Common issues & troubleshooting

    An out-of-range value is getting through and breaking something downstream. Unlike RiceRoundIntNode, which has min/max fields to constrain a published field, this node has no bounds at all - whatever the string parses to, you get. If the target field genuinely needs a constrained range (most do - a step count or a resolution shouldn't accept arbitrary integers), either validate it yourself downstream or use the native Int node instead.

    A malformed string isn't converting the way you'd expect. The exact parsing rule isn't documented anywhere in the README. Test with a deliberately broken input once - an empty string, letters instead of digits - and see what actually comes out before you build logic around an assumption.

    Should this be in the workflow you publish? Yes - it's Input-category, and per the README that's the family of nodes meant for the graph you feed into RiceRound Publish. The is_output_node flag on this specific node is a ComfyUI execution detail, not a signal that it belongs with the pack's Output-category debugging nodes; those are a separate, distinctly-categorized family you strip out before publishing.

    CategoryRiceRound/Input

    Inputs (2)

    NameTypeDefaultDescription
    nameSTRING数值
    strSTRING

    Outputs (1)

    NameTypeDescription
    valueINT