ComfyUI Node

Platform Prompt Rewriter

A ComfyUI node in Eric Prompt Enhancers with 26 inputs and 4 outputs.

By EricRollei·Created about a year ago·Updated 2 days ago· 47
Platform Prompt Rewriter
  • image
  • end_image
  • prompt
  • negative_prompt
  • report
  • system_prompt
◄idea►
◄platformkrea2►
◄taskauto►
◄backendlm_studio►
◄endpointhttp://localhost:1234/v1►
◄model►
◄temperature0.70►
◄max_tokens4096►
◄official_promptauto►
◄image_description—►
◄end_image_description—►
◄dialogue►
◄duration_seconds0.0►
◄aspect_ratio►
◄audioauto►
◄languageauto►
◄extra_instructions►
◄negative_keywords►
◄wildcard_seed-1►
◄wildcard_llm_blocktrue►
◄wildcard_instructions—►
◄nsfwoff►
◄violence_filteroff►
◄length_guardretry+trim►
CategoryEric Prompt Enhancers

Inputs (26)

NameTypeDefaultDescription
ideaSTRINGWhat you want, in your own words. Wildcards work: __name__, {a|b|c}, __objects[metal AND handheld]__.
platformCOMBOkrea2Target model. Listed as image models, then edit models, then video models. Each entry is a YAML file in the package's profiles/ folder; put your own or edited copies in profiles_user/ (same id = replaces the shipped one).
taskCOMBOautoauto = the model's main task. t2i text-to-image, edit = edit instruction, t2v text-to-video, i2v image-to-video, flf2v first+last frame, ref2v reference-to-video. A task the model does not have falls back to its main one (the report says so).
backendCOMBOlm_studio3 options: lm_studio, ollama, qwen3_vl
endpointSTRINGhttp://localhost:1234/v1LM Studio / Ollama base URL. For qwen3_vl, optionally a local model path.
modelSTRINGBlank = whatever model is loaded.
temperatureFLOAT0.700–2—
max_tokensINT4096256–32768Room for the LLM's answer. Reasoning models and MiniMax H3 prompts need the most.
official_promptCOMBOautoSeveral labs publish the system prompt of their own prompt rewriter. auto = use it when the profile has one and it is not huge; downloaded once, then cached on = use it whatever its size (Qwen-Image's is ~35,000 characters) off = always use the rules written in the profile (works offline) refresh = download it again, then behave like on
image_descriptionoptSTRINGFor i2v / edit: what the start or source image shows, from your own captioner. Used instead of captioning `image`.
end_image_descriptionoptSTRINGFor flf2v: what the last frame shows. Used instead of captioning `end_image`.
dialogueoptSTRINGExact spoken lines for models with sound, one per line, e.g. Woman: I get off at the next station. Used word for word. Empty = the rewriter invents speech only if your idea involves someone speaking.
duration_secondsoptFLOAT0.00–60Clip length for video models. 0 = not stated. The rewriter fits the action to it.
aspect_ratiooptSTRINGOptional, e.g. 16:9. The rewriter composes for it.
audiooptCOMBOautoauto = write sound, music and dialogue when the model generates audio. off = no sound design.
languageoptCOMBOautoLanguage of the prompt. auto = the model's first language (English for every shipped profile).
extra_instructionsoptSTRINGDirection for the rewriter for this run, e.g. 'keep it under 60 words', 'night exterior, handheld'.
negative_keywordsoptSTRINGComma-separated additions to the negative prompt. Passed through even for models that ignore negatives.
wildcard_seedoptINT-1-1–2147483647Seed for wildcards: __name__, {a|b|c}, __objects[tag AND tag]__. -1 = fresh roll every run. 0 or more = reproducible picks.
wildcard_llm_blockoptBOOLEANtrueTell the LLM which elements were picked at random so it keeps them: concepts keep their meaning, __=verbatim__ picks stay word for word. Off = the LLM only sees the resolved text.
wildcard_instructionsoptSTRINGConnect the llm_instructions output of a Wildcard Processor or Semantic Variation node here when the wildcards were resolved before this node. The LLM is then told which elements were picked at random, and verbatim picks are checked in its answer, exactly as if this node had resolved them itself.
imageoptIMAGEFor i2v / edit / flf2v: the start or source image. It is captioned through the backend above, which therefore needs a vision model loaded. A connected image_description wins over this.
end_imageoptIMAGEFor flf2v: the last frame. Captioned like `image`.
nsfwoptCOMBOoffHow far wildcard picks may go (a word match on each entry and on list names, no model). off = SFW: no suggestive, nude or explicit lists or entries suggestive = also lingerie, bikinis, sexy, seductive ... nudity = also nude, naked, topless ... explicit = everything, including lists under _nsfw/ Fix a wrong rating in _catalog_user.yaml (nsfw: on a list, ratings: on entries). Entries pairing minor-related and sexual terms are removed at every level (config.json "content_filter").
violence_filteroptCOMBOoffHold back violent wildcard picks (a word match on each entry and on list names, no model). off = nothing held back no gore = blood and gore, torture, mutilation, corpses no gore or violent acts = also murder, execution, stabbing, strangling, suicide ... no violence or weapons = also guns, swords, knives, bombs, battle, war Only wildcard picks are filtered; text you type is left as is.
length_guardoptCOMBOretry+trimKeeps the prompt inside the model's text-encoder limit (Krea 2: 512 tokens), with headroom for LoRA trigger words added later - past the limit the encoder silently drops the END, which is where triggers sit. retry+trim = ask the LLM once for a tighter version, then trim at a sentence end trim = trim only (no extra LLM call) off = report only

Outputs (4)

NameTypeDescription
promptSTRING—
negative_promptSTRING—
reportSTRING—
system_promptSTRING—