Nodes/Comfyroll Studio/πŸ”§ CR String To Boolean
ComfyUI Node Runs on cloud

πŸ”§ CR String To Boolean

Comfyroll's Text-to-Switch Node, Explained

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
πŸ”§ CR String To Boolean
    • BOOLEAN
    • show_help
    β—„textβ–Ί

    CR String To Boolean does exactly one thing, and it's a thing you'll run into more often than you'd think once you start wiring up conditional logic: it takes a piece of text and turns it into a real BOOLEAN wire.

    Why does that need its own node? Because ComfyUI is strict about socket types, and a lot of values in a graph float around as plain text - something typed into a Comfyroll CR Text widget, a value pulled out of a loaded text file, a parameter lifted from a prompt with CR Get Parameter From Prompt, or a string coming in from an API call. None of that is a BOOLEAN socket. But plenty of nodes want a real boolean to gate on - Comfyroll's own CR Set Value On Boolean, any input switch, anything branching your workflow. This node is the adapter between "text that says true or false" and "an actual switch."

    How it works. One text field in, one BOOLEAN out. Type the word for true or false into the field - I'd stick to lowercase true / false, since the exact parsing rule isn't documented anywhere public and I don't want to promise yes/1/enabled will behave the same way without you testing it first with a Show Text node downstream. It also emits a show_help string output, a pattern that runs through almost every Comfyroll node: a link back to the pack's wiki page for that specific node, in case a one-line description isn't enough.

    Where it's actually useful. Anywhere a switch needs to be driven by something that only speaks text: a workflow you're calling via the API where the caller passes "true"/"false" as a string parameter, a CR Text node you're using as a manual on/off toggle because it's easier to spot in a crowded graph than a tiny checkbox, or the output of another conversion node upstream. It's small and unglamorous, and that's the point - it saves you writing a one-off custom node every time a string needs to become a switch.

    Install. Comfyroll Studio - the pack this ships in, well over a hundred nodes from Suzie1 and RockOfFire - installs the normal way. Easiest is ComfyUI Manager: search "Comfyroll Studio" or "ComfyUI_Comfyroll_CustomNodes", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart ComfyUI. No models to fetch - it's a pure logic/utility pack, nothing pulled from HuggingFace or CivitAI.

    Troubleshooting. There's one real gotcha with this pack, and it isn't specific to this node - it's worth knowing before you install anything from Comfyroll. People on r/comfyui have hit installs where the log shows Comfyroll Studio: Failed to load Graphics nodes and Comfyroll Studio: Failed to load Utility nodes together, with a NameError underneath, and every single Comfyroll node disappears from the menu - not just the one that actually broke. That's because the whole pack registers its node classes from one shared file: if any one class fails to import (often from an incomplete download, like grabbing the CivitAI zip instead of doing a clean git clone), the entire registration step throws and takes CR String To Boolean down with nodes it has nothing to do with. If Comfyroll nodes go missing after an install, delete the folder and do a fresh git clone before you go chasing pip errors - it fixes this more often than reinstalling dependencies does.

    Category🧩 Comfyroll Studio/πŸ› οΈ Utils/πŸ”§ Conversion

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGβ€”

    Outputs (2)

    NameTypeDescription
    BOOLEANBOOLEANβ€”
    show_helpSTRINGβ€”