input Text 输入文本
A labeled text input that doubles as an exported API parameter
- text
InputText (2lab) is a text input box with ambitions. On the surface it's just a big multiline field where you type a prompt - but it belongs to the pack's workflow2Api family, which means it's designed to be a named, describable parameter in a workflow that can be exported as an API. Type the text once, label it, decide whether callers get to change it, and route the result wherever the graph needs it.
It's the node you'd reach for when you're building a workflow that other people run - a shared graph, a template, a hosted endpoint - and you want the prompt to be the obvious thing they edit. Compare that to core ComfyUI, where a prompt usually lives inside a CLIP Text Encode widget buried mid-graph. Pulling it out into a labeled input node makes the whole workflow read better, and the desc field lets you say what it's for.
How it works
Required inputs:
- text - the string itself, a multiline box. Paste a prompt, a style recipe, a template.
- type - an enum with three choices:
prompt,word,seg, defaultprompt. The author's three buckets for how the text should be treated: a full prompt, a single word/token, or a segment (a chunk of text). On your local graph this is essentially a hint - nothing changes about the output - but in the API mindset it tells the consuming layer what kind of string it's receiving. - desc - a label/description, the note that travels with the parameter.
- export - boolean, default
true. The API-surface switch: keep it on and the parameter is exposed to callers; flip it off and it stays internal to the workflow.
The output is text - a STRING carrying exactly what you typed. Wire it into a CLIP Text Encode for the prompt, into an LLM node as instruction text, or into a formatter. That's the whole graph-facing story.
Installing it
From the AI2lab/comfyUI-tool-2lab pack. ComfyUI Manager → search comfyUI-tool-2lab → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab
Restart ComfyUI after. No models, no dependency drama - this pack is a grab-bag of pure-python utilities from a Chinese dev (every node has a 中文 label; the README is one word long). If you've ever shared a workflow and watched someone struggle to find "the prompt box," this is the twenty-second fix: one clearly-labeled text input at the top of the graph, one wire down.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| type | COMBO | prompt | 3 options: prompt, word, seg |
| desc | STRING | — | |
| export | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |