Nodes/GALIAIS-Nodes/GALIAIS-Nodes Prompt Template
ComfyUI Node

GALIAIS-Nodes Prompt Template

Fill-in-the-blank prompts without a regex in sight

By GALIAIS·Created 3 months ago·Updated 3 months ago· 0
GALIAIS-Nodes Prompt Template
  • DB
  • 正面提示词
  • 负面提示词
  • 元信息JSON
模板来源手写
DB路径
模板ID或名称
正面模板
负面模板
质量
主体
角色
外观
服装
姿势
表情
镜头
场景
光照
风格
细节
自然语言
负面

The Prompt Template is the node that ties this pack's whole slot philosophy together. You define a prompt skeleton with {{placeholder}} holes in it, fill the holes with dedicated inputs, and it renders the finished positive and negative prompts. It's the boring-but-powerful middle of the GALIAIS flow: one template, many fillings.

The two ways to get a template

模板来源 switches between "手写" (handwritten) and "词典模板ID" (dictionary template ID).

  • Handwritten is what you'll start with. Type your skeleton into 正面模板 (positive) and 负面模板 (negative), using {{质量}}, {{主体}}, {{角色}} and friends as the holes. The 13 optional slot inputs - quality, subject, character, appearance, outfit, pose, expression, camera, scene, lighting, style, detail, natural language - are what get substituted in. Each one is forceInput, so you can wire them from other nodes instead of typing.
  • Dictionary template ID pulls a stored template out of the Danbooru DB by ID or name (the DB's prompt_templates table). You need a real DB path for this mode, and the downloaded template's positive/negative text becomes the skeleton. Everything else works the same.

The slot substitution is pleasantly forgiving: {{quality.style}} falls back to the plain {{风格}} slot if the dotted path isn't filled, so a slightly-misnamed placeholder degrades gracefully instead of crashing or spitting a literal {{...}} at the sampler.

What comes out

正面提示词 and 负面提示词 are your strings, plus 元信息JSON records which template and slots were used. One genuine gotcha: the positive output runs through the pack's Anima-flavored joiner, which strips quality tags (masterpiece, best quality, score_9) and any @artist token by default. If you're targeting a Pony or Illustrious checkpoint that wants score_9 in the positive, this node will quietly delete it. Plan your template accordingly - put quality tags in the negative side or accept the Anima cleaning.

Where it fits

Templates are how you keep a consistent structure across a whole batch. Lock the skeleton, vary the slots (feed 场景 from a random pool or a DB selector), and every generation shares the same anatomy while the details rotate. It's the reusable layer the one-shot Typed Composer V2 doesn't give you.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/GALIAIS/GALIAIS-Nodes.git

Restart ComfyUI. No dependencies. Dictionary-template mode needs the Danbooru runtime DB loaded (build it with Danbooru Runtime DB Builder, load it with the DB Loader), but handwritten mode runs with no DB at all. And yes - the slot inputs are labeled in Chinese (主体 is "subject", 场景 is "scene"). The tooltips help, but you'll memorize them in one session.

CategoryGALIAIS-Nodes/prompt

Inputs (20)

NameTypeDefaultDescription
模板来源COMBO手写2 options: 手写, 词典模板ID
DB路径STRING
模板ID或名称STRING
正面模板STRING
负面模板STRING
质量optSTRING
主体optSTRING
角色optSTRING
外观optSTRING
服装optSTRING
姿势optSTRING
表情optSTRING
镜头optSTRING
场景optSTRING
光照optSTRING
风格optSTRING
细节optSTRING
自然语言optSTRING
负面optSTRING
DBoptGALIAIS_NODES_DANBOORU_DB

Outputs (3)

NameTypeDescription
正面提示词STRING
负面提示词STRING
元信息JSONSTRING