Text Box Switch
A text box that switches itself off, so A/B testing prompts is one click
- TEXT
Testing prompt variants in ComfyUI usually means either editing one text box and re-running, or building parallel branches with duplicate encoders and flipping wires. IkkiTextBoxSwitch is the low-friction middle path: it's a text box you can turn off with a checkbox, and when it's off it outputs an empty string. Put a couple of these in a prompt chain and A/B testing becomes flipping checkboxes instead of rewiring the graph.
The mechanism is almost laughably simple - if active is true, output the text; if false, output "". That's the whole node. But the empty-string output is the point, because it composes cleanly with the pack's own IkkiPromptCombiner (which skips empty inputs, so a disabled switch drops its segment from the prompt entirely) and with ComfyUI's text encoders. A disabled segment contributes nothing instead of a garbage placeholder.
The sync trick
The genuinely clever bit is allow_sync and the "Sync This Slot 📋" button. If you have an IkkiPromptParser in the graph, you can rename a Text Box Switch to a category ("Pose", "Clothing", …), click sync, and it pulls that category's parsed value out of the parser and into the box. Even better: wire a parser output into the switch's optional text_input and it auto-renames itself to that category's name. So the workflow becomes: LLM writes a structured prompt → parser splits it → ten switches each hold one category → combiner reassembles it. Edit any category in place, or toggle it out entirely.
Inputs and outputs
- text - the box itself. Multiline, this is your prompt segment.
- active (on) - the kill switch. Off = empty string output.
- allow_sync (on) - enables the sync button behavior described above.
- text_input (optional) - wire a parser output here for the auto-category behavior.
- Output is a single TEXT string.
Install
Via ComfyUI Manager (search "ikki") or:
cd ComfyUI/custom_nodes
git clone https://github.com/RedsAnalysis/comfyui-ikki-pack
# restart ComfyUI
No extra dependencies.
Where it falls short
- The empty-string output is the only off-state. There's no "output the fallback text instead" mode. For A/B testing that's fine; for "use variant B when this switch is off" you're building that logic yourself.
- The sync magic only works with the Ikki pack's own parser. It's a closed ecosystem - a Qwen-prompt workflow that doesn't use IkkiPromptParser gets the sync button doing nothing useful.
- Renaming the node to a category to enable sync is a convention, not a setting - get the spelling wrong and the button just warns you. The auto-rename on wiring is the more reliable path.
It's the kind of small node that feels pointless until you've built a ten-category prompt harness and realized the alternative was a wall of duplicated text boxes. In that context - and in the pack's own example workflow, which uses sixteen of them - it's the connective tissue that makes modular prompting tolerable. Just know you're buying into the Ikki pack's way of doing prompts to get the full benefit.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| active | BOOLEAN | true | — |
| allow_sync | BOOLEAN | true | — |
| text_inputopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| TEXT | STRING | — |