Template Driven Taglist
Teach Grok Your Exact Taglist Style
- template_name
- taglist_prompt
If you generate on the SDXL-lineage models - Illustrious, NoobAI, Pony, WAI - you already know the drill: the prompt isn't prose, it's a comma-separated taglist, and the tags you pick matter more than the words you string together. Template Driven Taglist is a little style-transfer tool for exactly that world. You hand it a template taglist and a rough idea, and it asks Grok to rewrite your idea as a new taglist that mirrors the structure, density, and rhythm of the template. Same skeleton, fresh content.
It's part of the babydjacNODES pack, which is a one-person collection of prompt utilities, taglist tools, and API-backed "studios" - and this node is the template-flavored cousin of the pack's plain Safe Tag List Prompt. Where that one just rewrites, this one copies a pattern you control.
How it works
Under the hood, TemplateDrivenTagListPromptNode is a subclass of SafeTagListPromptNode, so it inherits all the safety plumbing and adds a template layer on top. The flow: it picks template text (from the dropdown or your pasted custom template), bundles it with your custom_idea, and fires off a call to x.ai's chat completions endpoint with a system prompt that says, essentially, "write a concise comma-separated taglist that mirrors this template's structure, density, and style." Output is a single string.
The template source is the interesting part. The node loads templates from a templates.json file that sits next to the source code, and exposes them in the template_name dropdown. Here's the gotcha: the shipped repo doesn't actually include that file, so the dropdown default is the lonely <no-templates-found> placeholder. In practice you'll paste your own template into custom_template instead - a few lines of your best taglist is all it takes.
The inputs that matter
- custom_template - your reference taglist. This is the style the output will mimic. If the dropdown ever gets populated, you can pick a saved one instead.
- custom_idea - the thing you actually want described as a taglist.
- safe_mode - defaults to
true, with a hefty built-in blocklist (nsfw, porn, nude, and friends). If the template or the idea trips it, the node refuses before the API call, then double-checks the model's output afterward. - api_key - leave blank and it falls back to the
XAI_API_KEYenvironment variable.
One output, taglist_prompt, a plain STRING you wire straight into your positive prompt. Because it's flagged as an output node, it also shows its result on the canvas, which is handy for eyeballing before you queue.
Install
Same story as the rest of the pack - no model downloads, no requirements.txt gymnastics. requests is bundled with ComfyUI, so the only real dependency is an xAI key:
cd ComfyUI/custom_nodes
git clone https://github.com/babydjac/babydjacNODES
# restart ComfyUI
Or search "babydjacNODES" in ComfyUI Manager and install from there. Restart after install; hard-refresh the browser if the UI looks stale.
Where people get burned
- No key, no output. This node phones home to Grok; without a key in the widget or the
XAI_API_KEYenv var you get a "No API key provided." string back. - The empty template dropdown. You'll see
<no-templates-found>and think you broke it. You didn't - there's just no templates file shipped. Usecustom_template. - safe_mode rejecting your idea. This is an NSFW-friendly pack elsewhere, but this node defaults to SFW with a long blocklist. If your idea trips it, either rewrite the idea or turn
safe_modeoff and trim the blocklist to taste.
It's an API-wrapper node, so the usual rule applies: you're handing a third-party custom node your credentials and your prompt text. This one is young and small, but it's a reasonable pattern - local taglist in, Grok-processed taglist out.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| template_name | CHOICE | <no-templates-found> | — |
| custom_template | STRING | — | |
| custom_idea | STRING | — | |
| api_key | STRING | — | |
| model_nameopt | STRING | grok-3-latest | — |
| temperatureopt | FLOAT | 0.200–1 | — |
| safe_modeopt | BOOLEAN | true | — |
| blocklistopt | STRING | nsfw, porn, sexual, sex, nude, naked, topless, boobs, breast, areola, pussy, ass, butt, buttocks, erotic, explicit, horny, aroused, arousing, cum, ejaculate, semen, oral, anal, penetration, blowjob, handjob, vagina, penis, cock, dick, fetish, bdsm | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| taglist_prompt | STRING | — |