Tag Injector
The three-placeholder sibling in the pack's tag-injection family
- tagged_text
- placeholders
comfyui_gr85's README documents three tag injectors by name - Single, Duo, Large - but the plain, unsuffixed GR85_TagInjector sitting alongside them isn't called out individually. It's not hard to place, though: Single fills one placeholder, Duo fills two (elements and stuff, per the README), and this one's default tag names are elements, stuff and things - literally Duo's two plus a third. It's the middle sibling: three placeholders, between Duo's two and Large's ten. It's a small but real convenience once your templates start getting long - three swappable pieces is often the sweet spot between Single's one slot (too few for anything but the simplest template) and Large's ten (overkill unless you're building something genuinely elaborate).
How it works. You write a template string containing __placeholder__-style markers - the default is just __elements__ - and supply up to three values through tag_1, tag_2, tag_3, each named by a corresponding tag_name_N field (defaults elements, stuff, things). The node swaps each named placeholder in the template for its matching tag value. Build something like "a photo of __elements__ near __stuff__ surrounded by __things__" and feed each slot with its own value - possibly itself the output of a randomizer node elsewhere in the pack - to compose a prompt from independently-controlled pieces instead of hand-editing one long string every time you want a different combination.
Inputs and outputs. template (required, multiline, default "__elements__"). tag_1/tag_2/tag_3 (optional, multiline strings) - the substitution values. tag_name_1/tag_name_2/tag_name_3 (optional strings, defaulting to elements/stuff/things) - which placeholder each tag targets. Outputs are tagged_text - the template with placeholders swapped in - and placeholders, which isn't documented beyond its name; read it as a status/debug string about which placeholders the node worked with rather than something you'd typically wire further downstream.
Installing it. Standard pack install - search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI. Pure string substitution, no dependencies.
The one thing that actually breaks this. The placeholder text in your template has to match tag_name_N exactly - case and underscores included. Out of the box this lines up (__elements__ in the default template, elements as tag_name_1), but the moment you rename tag_name_1 to something else, you also have to update the __placeholder__ text in your template to match, or that slot silently never fires. And an unconnected tag_N presumably leaves its placeholder untouched in the output - always check tagged_text before trusting it downstream, so you're not shipping a literal __elements__ string into your CLIPTextEncode.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| template | STRING | __elements__ | — |
| tag_1opt | STRING | — | |
| tag_2opt | STRING | — | |
| tag_3opt | STRING | — | |
| tag_name_1opt | STRING | elements | — |
| tag_name_2opt | STRING | stuff | — |
| tag_name_3opt | STRING | things | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| tagged_text | STRING | — |
| placeholders | STRING | — |