Single Label Switch
A boolean that outputs words instead of true/false
- Label
Here's a small problem every ComfyUI power user hits eventually: you have a boolean toggle, but what you actually want to feed into a filename isn't true or false - it's "highres" or nothing. Single Label Switch is the three-widget answer to that. It's a boolean toggle with a text label, and its output is the label when on, an empty string when off. That's it. And it's one of those nodes you don't appreciate until you realize you've hand-typed "highres" into fifty filename templates.
What it does
You set a label (say, "highres"), and a state boolean. When state is on, the node outputs the label text. When off, it outputs an empty string. The output is a plain STRING, so it drops into filename builders, prompt concatenation, or anywhere a string is accepted.
The pack's description sums up the use case: "useful for adding the same text to more than one node." One toggle, one label, fan out to a dozen places - flip the switch and every connected filename or prompt picks up (or drops) that text at once.
Inputs and outputs
state- boolean, labeledOn 🟢/Off 🔴in the AUN toggle convention. You can drive it from another node's boolean output too, so it composes with switches elsewhere in the graph.label- the text to emit when on. Default "label"; change it to whatever you actually want in your filenames.- Output:
Label(STRING) - the label when on, empty string when off.
How it works
Two widgets in, one string out: if state: return (label,) else return ("",). No hidden logic, no side effects, no state to desync. The empty-string-when-off behavior is the part that makes it useful - an empty string in a filename template collapses to nothing, so your filenames stay clean instead of containing "False" or a stray token.
Where it fits
The AUN pack has several label/toggle utilities, and they serve different jobs. Single Label Switch is the minimal one: a single label, on or off. The Manual/Auto Text Switch handles the bigger "manual name vs auto filename" decision. And the bypass/mute controllers emit labels for their node states to keep filenames in sync. If all you need is "add this one string when I flip this one switch," stop here - this is the node.
It's also quietly useful for A/B testing: set the label to "versionA", toggle it between runs, and every output file self-labels which variant it belongs to. Toggle it from another boolean, and you can switch a whole naming convention with one input.
Installing
It ships in the AUN ComfyUI Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
Restart ComfyUI, or use ComfyUI Manager (search "AUN"). No models, no heavy deps - pack-standard requirements only, auto-installed by Manager or via pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt for manual clones.
One honest limitation: it's one label, not a list. If you need to switch between several different labels based on more than one state, look at a text-index switch or a prompt cycler instead. For a single on/off word, this is as simple as it gets.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| state | BOOLEAN | false | Toggle label switch between on and off states. |
| label | STRING | label | Text label to be switched on or off. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Label | STRING | — |