Insert Text 插入文本 (2lab)
Slot four snippets into a template and get one string out
- STRING
InsertText (2lab) is the pack's answer to a classic annoyance: you've got a text template - a prompt skeleton, a caption pattern, a message format - and you need to drop a few variable pieces into it. The display name says it plainly: "Insert Text 插入文本". One template in, up to four snippets, one assembled string out.
The pattern it serves is everywhere in real workflows. Your base prompt is "masterpiece, <style>, a <subject> in a <setting>, cinematic lighting" and the three angle-bracket slots change per batch. Or you're generating prompts programmatically and want to keep the skeleton in one place instead of rebuilding the whole string in a big text node every time. This node is the small structured way to do it - you type the template once, then only the pieces that vary.
How it works
Required inputs:
- fullText - the base text, a multiline box. This is your template: the string that the other pieces get inserted into.
- text1 - the first snippet to insert, required.
Optional inputs:
- text2, text3, text4 - three more snippets, each optional.
The single output is STRING - the assembled result, ready to feed a CLIP Text Encode, an LLM node, or a file writer.
Now the honest caveat: the pack's README is one word long, so the exact insertion mechanism is undocumented - how fullText marks where the snippets go (placeholders, indices, position-based?) isn't stated anywhere public. Treat it as the author's template-and-fill utility: put your skeleton in fullText, supply the varying pieces in text1 through text4, and take the combined string off the output. If you're building a prompt pipeline, the practical flow is to feed the assembled result straight into prompt conditioning, or chain it into an LLM call for a reword pass.
Installing it
It's part of AI2lab/comfyUI-tool-2lab. ComfyUI Manager → Custom Nodes Manager → search comfyUI-tool-2lab → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab
Restart ComfyUI after. As always with this pack - Chinese dev, every node labeled in 中文, zero documentation - there are no models to download and no dependency roulette. If your workflow keeps building the same prompt shape with different fill-ins, this is the node that stops you from retyping the skeleton a hundred times. If it turns out the insertion scheme isn't what you expected, worst case you're out one node and the pattern still teaches you how to think about prompt templates.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| fullText | STRING | — | |
| text1 | STRING | — | |
| text2opt | STRING | — | |
| text3opt | STRING | — | |
| text4opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |