ZML_选择文本V2
Five prompt boxes you can switch on and off, all inside one node
- 文本
ZML_SelectTextV2 is the "type it in here" version of the pack's text selector. V1 asks you to wire five external text inputs; V2 just hands you five multiline text boxes and five toggles, and merges whatever's switched on into one prompt string on the other side. It's the node for the very common case: you want a handful of prompt variants handy on the canvas without dragging wires around.
If you've used the pack at all you've probably seen the family - the V3 is the fancier dynamic one with folders and random mode, and this is the fixed-format middle child. Sometimes fixed-format is exactly what you want: five slots, no surprises, done.
The inputs that matter
- 文本1 … 文本5 - multiline text boxes. Type your prompt variants here. They're plain widgets, so they're stored in the workflow and travel with it when you share.
- 启用1 … 启用5 - the toggles, 启用1 on by default, the rest off. Only enabled texts make it into the output.
- 分隔符 - joins the enabled texts, default
,\n\n. The pack's standard separator, so a base prompt, a style block, and a quality suffix stay visually separate in the box.
Mechanically it's simple: the node walks the five (toggle, text) pairs, collects the enabled ones in order, and joins them with the separator into the single 文本 output. That output goes straight into a CLIP Text Encode - you don't need to think about it further.
Where it fits
The workflow pattern is "keep the parts of the prompt you change often as separate blocks." Base character on 文本1, environment on 文本2, style/quality on 文本3 - flip 启用 toggles to test combinations. Because the toggles are plain booleans, an upstream logic node can also flip them, so this doubles as a poor-man's prompt router when you want the workflow to decide which block applies.
The honest comparison: V3 does all of this with dynamic rows you can add and remove, plus random selection and folder-driven presets - it's the "real" prompt preset tool in the pack. V2's edge is simplicity. Five fixed slots, one separator, one output, nothing to configure that could break. If you want to be able to add a sixth slot later without re-jigging the workflow, V3; if you want a dead-simple five-slot switcher that just works, V2 is perfectly good and slightly easier to read on a crowded graph.
Install
It's in the ComfyUI-ZML-Image pack: ComfyUI Manager → search "ComfyUI-ZML-Image", or cd ComfyUI/custom_nodes && git clone https://github.com/zml-w/ComfyUI-ZML-Image, restart. The node shows as ZML_选择文本V2 in a Chinese-language UI by default, so pick up the English patch if needed. No models, no extra deps for this node.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| 文本1 | STRING | — | |
| 文本2 | STRING | — | |
| 文本3 | STRING | — | |
| 文本4 | STRING | — | |
| 文本5 | STRING | — | |
| 分隔符 | STRING | ,\n\n | — |
| 启用1 | BOOLEAN | true | — |
| 启用2 | BOOLEAN | false | — |
| 启用3 | BOOLEAN | false | — |
| 启用4 | BOOLEAN | false | — |
| 启用5 | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 文本 | STRING | — |