Nodes/GALIAIS-Nodes/GALIAIS-Nodes Positive Prompt AI Enricher
ComfyUI Node

GALIAIS-Nodes Positive Prompt AI Enricher

Hand Your Tag Prompt to an LLM — and Keep It From Wandering

By GALIAIS·Created 3 months ago·Updated 3 months ago· 0
GALIAIS-Nodes Positive Prompt AI Enricher
  • AI服务商
  • DB
  • 增强正面提示词
  • 自然语言补充
  • 分析JSON
  • 原始响应JSON
正面提示词
上下文说明
输出语言中文
合并模式追加到末尾
细节强度标准
去重true
失败时返回原文false
随机种子0
启用冲突剔除false
冲突剔除策略自动
允许NSFWfalse
扩写模式自然语言补充
最少句数2
最多句数4

Sometimes you have the bones of a prompt and you want someone to flesh it out. That's the Positive Prompt AI Enricher: it takes your tag-based positive prompt, runs it through an LLM, and returns an enriched version plus the natural-language supplement the model wrote - with controls for how much it's allowed to add and where it goes.

The catch, and it's the honest one: this is the node in the pack that genuinely needs an AI provider. No AI服务商 wired in, no output. It's OpenAI-compatible, so the provider is whatever /v1-style endpoint you point it at - OpenAI, OpenRouter, or a local Ollama/LM Studio.

How it works

You feed it AI服务商 (the provider object, from the pack's AI Provider or Project Config node) and 正面提示词 (positive prompt). Then the knobs:

  • 扩写模式 (expansion mode) - five modes, and they matter a lot: 自然语言补充 (natural-language supplement), Anima-complete-natural-language, Anima training caption, 场景导演描述 (scene director), and Tag-constrained full expansion. The Anima modes write in that model family's caption style; the scene-director mode frames it as scene direction. Pick per target model.
  • 合并模式 (merge mode) - 追加到末尾 (append), 前置自然语言 (prepend natural language), 仅自然语言 (natural language only), or 仅分析不合并 (analyze only, don't merge).
  • 上下文说明 (context) - free text so the LLM knows what it's expanding.
  • 输出语言 (Chinese / English / mixed), 细节强度 (refined / standard / detailed), 最少句数 / 最多句数 (min/max sentences) - the sentence range is your leash on how chatty the LLM gets.
  • 启用冲突剔除 with a 冲突剔除策略 - deterministic conflict pruning runs before the LLM, so the model doesn't inherit contradictions.
  • 失败时返回原文 - off by default; if the API call fails, you get the original prompt back unaltered. (The orchestrator's default is on, worth noting.)

Outputs: 增强正面提示词 (the merged final prompt), 自然语言补充 (the supplement on its own), 分析JSON, and 原始响应JSON (the raw LLM response - the debugging output when the enrichment looks off).

Installing it

It ships in the GALIAIS-Nodes pack:

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

Restart ComfyUI, or install via ComfyUI Manager ("GALIAIS-Nodes"). No Python dependencies, but you do need an OpenAI-compatible endpoint and a key - supply the key as plain text or via env:VAR_NAME / $VAR_NAME syntax. Field labels are Chinese, as throughout the pack.

The honest caveats

Two failure modes, both well documented in the ecosystem. First, subject drift: an enhancer with free rein adds detail you never asked for - which is why the sentence range, the mode choice, and the pre-LLM conflict pruning exist. Keep the leash short (fewer sentences, natural-language-supplement mode) and the drift stays small. Second, dirty output: a chat LLM loves emitting "Here is your enhanced prompt:" preamble. This node parses the response rather than blindly concatenating, but 原始响应JSON is where you check when something odd lands in your prompt. And remember responses are cached (see DB Cache Control) - if your enrichment looks frozen, clear the cache before blaming the model.

CategoryGALIAIS-Nodes/ai

Inputs (16)

NameTypeDefaultDescription
AI服务商GALIAIS_NODES_AI_PROVIDER
正面提示词STRING
上下文说明STRING
输出语言COMBO中文3 options: 中文, 英文, 中英混合
合并模式COMBO追加到末尾4 options: 追加到末尾, 前置自然语言, 仅自然语言, 仅分析不合并
细节强度COMBO标准3 options: 精炼, 标准, 详细
去重BOOLEANtrue
失败时返回原文BOOLEANfalse
随机种子INT00–4294967295
启用冲突剔除BOOLEANfalse
冲突剔除策略COMBO自动3 options: 自动, 保留前者, 保留后者
允许NSFWBOOLEANfalse
扩写模式COMBO自然语言补充5 options: 自然语言补充, Anima完整自然语言, Anima训练标注Caption, 场景导演描述, Tag约束全面扩写
最少句数INT21–8
最多句数INT41–12
DBoptGALIAIS_NODES_DANBOORU_DB

Outputs (4)

NameTypeDescription
增强正面提示词STRING
自然语言补充STRING
分析JSONSTRING
原始响应JSONSTRING