ComfyUI Node

NO8D-Prompt

The LLM prompt node that needs no LLM of its own

By no8d·Created 2 months ago·Updated 14 days ago· 271
NO8D-Prompt
  • images
  • prompt
prompt_rules自然语言
style_preset自行判断
composition_preset自行判断
length_preset标准
output_language英文
seed0
extra_rules

The name is a small lie. NO8D-Prompt (class NO8DBatchPromptPlus) looks like it should contain a language model, and it does not - it's a client. You type a rough idea, or feed it a reference image, or both, and it sends that to a large language model you configure yourself, then returns the polished prompt as a string ready for the encoder. Text-only, image-only, or text-plus-image, it does the prompt-engineering work so your sampler gets a clean, structured instruction instead of "a girl in a forest."

That configuration-first design is the thing to internalize before anything else. There is no built-in LLM, no API key, no model files in this pack. Before the node will output anything, you must set up a service in ComfyUI Settings → NO8D-controlAPI Manager under the Prompt panel. Add an OpenAI-compatible API (Base URL + key) or a local Ollama service (no key), hit Validate API, and pick your models - a text model for text expansion, and a separate vision model for image analysis if your images need it. Ollama just needs to be running with the model already pulled. Keys stay in your local ComfyUI environment, which is exactly where they belong.

The inputs that matter

  • prompt_rules - Natural language or JSON structure for the output format. Natural language is the default and usually what you want.
  • style_preset - six options: auto-judge, no style description, realistic photography, anime illustration, hand-drawn art, digital art. The "no style description" mode is the interesting one - it tells the model to describe everything but name a style, which keeps your locked-in target style from being contradicted.
  • composition_preset - shot scale: extreme close-up through extreme wide. This is the "how far away is the camera" dial.
  • length_preset - Standard or Detailed. Standard keeps the output tight; Detailed lets the model write longer.
  • output_language - English or Chinese for the generated prompt.
  • seed - plus a batch-aware detail: when it produces multiple outputs, each item gets seed + index, so a batch is varied but reproducible.
  • extra_rules - your own instructions appended to the system prompt. This is the escape hatch for "always mention the lighting" or "never say 'epic'".
  • images (optional) - wire an IMAGE or image list here for reference-image analysis. Each image is analyzed and combined with the text.

Output is prompt - a STRING list, one entry per input image, ready to feed a prompt view node or an encoder.

How it works

The presets become instructions: the node maps your style/composition/length choices to rule text that shapes the LLM's output, keeps the source medium separate from a locked target style, and corrects conflicting style vocabulary once if needed. Image analysis builds a proper chat conversation around the image rather than shoving it in. There's real caching under the hood - identical messages, model, and seed reuse the previous result instead of burning another API call - so rerunning a workflow doesn't re-bill you. The json-repair dependency in this pack's requirements exists because JSON-mode output from chat models arrives broken often enough that repair is worth shipping.

Gotchas

The most common failure is a config one: no models in the dropdown after saving. The README's advice is to re-check the Base URL and API key, validate the service again, and for Ollama confirm the model is actually installed and the daemon is up. The second trap is model fit - text expansion on a vision-only model fails, and image analysis on a text-only model fails. Pick a multimodal model if you're feeding it images. And treat the output as a draft you review: like every LLM prompt node, subject drift is real, which is why the pack ships NO8D-Prompt-view to read and edit what came back before it touches your prompt.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
python -m pip install -r requirements.txt

ComfyUI Manager → "NO8D-controls". The only dependencies are openpyxl and json-repair. No model downloads - the LLM lives in your API config, not in this pack.

CategoryNO8D-control

Inputs (8)

NameTypeDefaultDescription
prompt_rulesCOMBO自然语言4 options: 自然语言, json结构, Natural language, JSON structure
style_presetCOMBO自行判断6 options: 自行判断, 不描述风格, 写实摄影, 动漫插图, 手绘艺术, 数字艺术
composition_presetCOMBO自行判断7 options: 自行判断, 大特写, 特写, 近景, 中景, 全景, +1
length_presetCOMBO标准4 options: 标准, 详细, Standard, Detailed
output_languageCOMBO英文4 options: 英文, 中文, English, Chinese
seedINT00–18446744073709550000
extra_rulesSTRING
imagesoptIMAGE

Outputs (1)

NameTypeDescription
promptSTRING