String To Bool (Soze)
Bridge text output into a real boolean wire
- BOOLEAN
ComfyUI treats STRING and BOOLEAN as incompatible wire types - you can't just connect a text output straight into a boolean input, even if the text is literally the word "True." This node is the bridge: feed it text, get a proper BOOLEAN out the other end that any switch, gate, or conditional node in your graph will actually accept.
Where it fits
The usual source feeding this is something else in the pack that produces text where you'd conceptually want a yes/no - a value pulled out of a JSON Value Parser that reads "true"/"false" from an external config file, or a field read from a CSV row rather than user input directly. Either way, you end up holding a STRING where the rest of your graph - a Switch node, a conditional branch - wants a real BOOLEAN. Rather than restructuring your graph so everything stays boolean-typed from the start, you drop this in at the seam and convert.
The input and output that matter
- string - the text to interpret, default
"False".
Output is a single BOOLEAN.
Exactly which strings count as true isn't spelled out anywhere in the node itself - the default value being "False" (capitalized) suggests it's checking against "True"/"False" rather than something like "1"/"yes". If you're feeding it anything other than a literal "True" or "False" string, it's worth a quick test with a text preview node before you wire it into something you're relying on, just to confirm it parses the way you expect.
A practical example: you're driving a batch of runs off a CSV of test configs, and one column is "enable_hires" with "True"/"False" values per row. CSV Reader hands that column back as text no matter what. Wire it through this node before it reaches anything that gates on a real boolean - a Switch controlling whether an upscale branch of your graph runs at all - and the whole grid can flip that setting per row without you touching the graph between runs.
Installing it
ComfyUI Manager: search ComfyUI_Soze. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SozeInc/ComfyUI_Soze.git, pip install -r ComfyUI_Soze/requirements.txt, restart. No dependencies beyond the pack - it's a type conversion, nothing more.
Common issues
The main failure mode is upstream, not in this node: if whatever's feeding string produces something unexpected - extra whitespace, a different casing, an empty string - the conversion may not land where you think. When a boolean gate isn't flipping the way you expect, check the actual text hitting this node first (a Preview node on the wire is the fastest way) before assuming the conversion logic is at fault.
It's also a small enough node that it's tempting to skip installing the whole pack just for this one conversion - but it ships as part of ComfyUI_Soze, alongside its String To Float and String To Int siblings, so you get all three type bridges from one install regardless of which one you actually needed today.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | False | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |