Safe Tag List Prompt
Template-Matching Taglists, With a Safety Net
- taglist_prompt
The Safe Tag List Prompt solves a weirdly specific problem: you have a template taglist that you know works - the right density, the right tag style - and you want new taglists that mirror it, but for different ideas. Type an idea, paste a template, and Grok rewrites your idea as a taglist that matches the template's structure and style. The "Safe" part is the safety net: a blocklist that rejects explicit content before the call, and a post-check that blocks it again if it sneaks into the output.
It's from the babydjacNODES pack, and it's the "SFW" side of an otherwise NSFW-oriented pack - the author's own tool for keeping prompt generation clean where it needs to be.
How it works
You provide template_text (the working taglist) and custom_idea (the new concept). If safe_mode is on, the node first checks both against the blocklist - a long comma-separated list of explicit terms that defaults to essentially the entire NSFW vocabulary (nsfw, porn, sexual, sex, nude, ... bdsm). If either input trips it, you get Input rejected by safe_mode blocklist and the call never happens.
If it passes, the node sends a system prompt to the API (default grok-3-latest, temperature 0.2) that says: rewrite the idea as a taglist mirroring the template's structure, density and style; keep it SFW; output only the taglist. After the response comes back, safe_mode does a second check on the model's output and blocks it too if the model drifted explicit. So the blocklist guards both sides of the call - that's the "safe" made real.
The inputs that matter
- template_text - required. The working taglist whose shape you want copied. If it's empty, you get "Please provide a template taglist."
- custom_idea - required. What the new taglist should be about.
- api_key - required (no env-var fallback in this one).
- safe_mode - on by default; the whole point of the node.
- blocklist - editable, so you can extend (or relax) the vocabulary. This is where you customize what counts as "unsafe."
Output: a single STRING, taglist_prompt.
Install
ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes, restart, hard-refresh. No extra pip deps.
Gotchas
- The blocklist is a blunt instrument. Whole-word matching means
cockpitis safe but anything literally containingsex,anal, orpenisis rejected. If your template uses a term that trips the filter, edit the blocklist - that's what the editable field is for. - "Template" means density, not content. The node mirrors structure and tag style, not your exact tags. A sparse template gives a sparse output; a dense one gives dense output. Garbage in, shaped garbage out.
- It's a paid API call per run. The dual safety checks happen around one Grok call, and you pay for it every queue. If you're batch-generating taglists, count the cost.
For anyone who's found a taglist format that works and wants variations on it without reinventing the format - and needs the content to stay clean - this node is the pack's most purposeful SFW tool.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| template_text | 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 | — |