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

RiceRound Str To Boolean

Turn text into a true/false value

By RiceRound·Created 2 years ago·Updated about a year ago· 22
RiceRound Str To Boolean
    • value
    name开关
    str

    Not to be confused with RiceRoundBooleanNode, which gives you a plain checkbox widget you set directly. This node takes a STRING and converts it into a BOOLEAN - the tool you reach for when the value you want to branch on is already flowing through your graph as text, rather than something you're setting by hand on a toggle. Chain it after RiceRoundInputTextNode, or after a wildcard BASIC output like RiceRoundSimpleChoiceNode's, and you get back a real true/false you can wire into anything that expects one.

    Why a conversion node like this exists

    ComfyUI_RiceRound is a workflow-publishing layer, not a generation pack: its Input-category nodes are the building blocks RiceRound Publish scans for when it decides what becomes an editable field on your hosted page. Not everything in that system arrives as a clean native type, though - some values genuinely start life as strings, whether from another RiceRound field or something upstream in your own graph. RiceRoundStrToBooleanNode is the bridge for that specific case: string in, boolean out, so whatever's downstream that actually needs a BOOLEAN socket gets one.

    The inputs and output that matter

    • name (STRING, default "开关" - "switch" in Chinese) - the label for this field. Override it if your audience isn't Chinese-speaking; the pack's defaults ship untranslated across the board.
    • str (STRING) - the text being converted.
    • Output: value (BOOLEAN) - the parsed result.

    Worth flagging plainly: the README doesn't document exactly what string values count as true versus false. Feed it something unambiguous like "true" or "false" while testing and check the actual output before wiring anything important behind it - don't assume it matches a specific language's or library's convention.

    Installing it

    Search "RiceRound" in ComfyUI Manager and install, or clone it directly:

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

    Restart ComfyUI afterward. Nothing in the README calls for extra Python dependencies or a model download - this pack packages workflows, it doesn't run inference of its own.

    Common issues & troubleshooting

    Is this safe to leave in the workflow you publish? Yes - it's Input-category, and the README's rule is that Input-category nodes are exactly what belongs in the graph you feed into RiceRound Publish. The nodes to strip out first are the separate Output-category ones.

    The boolean isn't coming out the way you expect. Since the parsing rule isn't spelled out anywhere in the README, test with an obvious literal string first rather than assuming behavior. An empty string, "0", or a differently-cased value are all worth checking individually before you rely on this in a published workflow.

    You just want a plain on/off field, no conversion involved. That's RiceRoundBooleanNode - a native checkbox widget, no intermediate string required. Reach for this node specifically when the value is already text somewhere in your pipeline, not as a default way to build a toggle field.

    CategoryRiceRound/Input

    Inputs (2)

    NameTypeDefaultDescription
    nameSTRING开关
    strSTRING

    Outputs (1)

    NameTypeDescription
    valueBOOLEAN