Boolean to String | Ollama Nodes
The three-second bridge that turns a checkbox into text
- string_value
BooleanToString does exactly what the name says: a Boolean in, a string out - True or False. One input, one output, nothing else. It's not glamorous and it won't make anyone's showcase workflow, but it solves a genuinely annoying ComfyUI friction point: plenty of nodes take strings, and not all of them take booleans.
Why you'd reach for it
ComfyUI's type system is strict, and the glue you need isn't always there. You've got a checkbox (a Boolean from any node - an enable/disable toggle, a "keep loaded" flag, whatever) and you want to inject that decision into a prompt template or a text-based configuration. Maybe you're building a workflow that reads "True" or "False" into a system prompt for an LLM node, or you want a human-readable status line in a ShowText node. That's this node's entire reason to exist: it's a type adapter.
It's the sort of node you only appreciate after you've spent twenty minutes trying to jam a Boolean into a string input and ComfyUI just refuses. Wire it through BooleanToString and the problem evaporates.
How it works
When you drag it in, the boolean_value input is marked forceInput - meaning you have to connect a Boolean from another node rather than type one in. The node converts it: True → "True", False → "False" (capitalized, Python-style, not lowercase "true"/"false"). The single string_value output feeds anything that accepts a string.
One input, one output:
boolean_value(required) - the Boolean to convert, forced as an input connection.string_value- the resulting"True"or"False"string.
Installing it
This is part of the slyt/comfyui-ollama-nodes pack, so it arrives with the whole family:
cd ComfyUI/custom_nodes
git clone https://github.com/slyt/comfyui-ollama-nodes
cd comfyui-ollama-nodes
pip install -r requirements.txt
or ComfyUI Manager → search "comfyui-ollama-nodes" → Install → restart. Note it's a Utility-category node, not under "LLM/Ollama" - if you're hunting for it in the menu, look in Utility.
Gotchas
- The output casing is Python-style (
True/False). If whatever you're feeding it expects lowercase, you'll need to adjust the string downstream - a small "string replace" style node handles that. - It's one of four sibling converters in the pack (FloatToString, IntToString, and ListToString are the others). If you're converting a number instead of a Boolean, grab the matching one - same pattern, same trade-offs.
- Since it always re-executes, it's never the source of a caching mystery; it just recomputes the trivial conversion every run.
Honest assessment: if you don't do prompt templates or dynamic workflow text, you may never touch it. But it's one of those free utilities that saves a headache exactly when you need it, and there's no setup cost to having it around.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string_value | STRING | — |