Nodes/ComfyUI_MieNodes/Custom System Prompt Generator ๐Ÿ‘
ComfyUI Node

Custom System Prompt Generator ๐Ÿ‘

The one prompt generator that runs any system prompt

By MieMieeeeeยทCreated 2 years agoยทUpdated 28 days agoยท 225
Custom System Prompt Generator ๐Ÿ‘
  • llm_service_connector
  • source
  • reference_images
  • reference_video
  • custom_prompt
โ—„input_textโ–บ
โ—„system_prompt_namebernini/t2i_a14b_enโ–บ
โ—„seed0โ–บ
โ—„video_frames3โ–บ
โ—„reference_video_frames3โ–บ
โ—„image_detailautoโ–บ
โ—„temperature0.80โ–บ
โ—„max_tokens8192โ–บ

This is the general-purpose engine under all the model-specific prompt generators in the pack. Instead of being locked to one target model, it lets you pick a named system prompt from a list - one per model family, plus any you've registered yourself - and run your input through it. It also takes images, so it doubles as a vision-aware prompt writer. If the Flux2 or Ideogram4 generators are the presets, this is the node you graduate to when you want to choose the recipe.

Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under Prompt Generator.

Why you'd use it

The dedicated generators each bake in a system prompt tuned for one model. Handy, but limiting - you can't easily switch which style you're targeting, and you can't use your own. CustomSystemPromptGenerator exposes the choice directly. The system_prompt_name dropdown carries built-in recipes for a whole spread of model families (Bernini t2i/t2v, Flux2, Flux Klein, Hunyuan, Krea 2, LTX2, plus general expand/random/translate variants), and it also lists any custom system prompts you've registered with the pack's AddCustomSystemPrompt node.

That last part is the real power. The KB's prompt-engineering doc makes the point that the system-level framing is what actually steers an LLM's output - so owning that framing is the difference between nudging results and controlling them. Register your house style once, then run everything through it here.

It's multimodal too. There are optional inputs for a source image, reference images, and even reference-video frames, so on a vision-capable connector the model can see what it's writing about - useful for image-to-image or reference-guided prompt work rather than pure text-to-image.

The inputs and outputs that matter

Required:

  • llm_service_connector - the LLM connection.
  • input_text - your raw idea/instruction. Multiline.
  • system_prompt_name - the recipe. Default bernini/t2i_a14b_en; the list spans many families and includes your registered ones.
  • seed - reroll for variation.

Optional (the ones a beginner might actually touch):

  • source, reference_images, reference_video (all IMAGE) - feed media so a vision model can look at it.
  • video_frames (default 3) and reference_video_frames (default 3) - how many frames of each to forward.
  • image_detail (auto/low/high), temperature (default 0.8), max_tokens (default 8192 - generous, so long structured outputs won't truncate).

Output is custom_prompt (STRING) - wire it into your model's conditioning/text input.

Installing it

ComfyUI Manager โ†’ search ComfyUI-MieNodes โ†’ install โ†’ restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes

then restart. No model download for the node. It needs a working connector (with a key); the media/vision inputs additionally need a multimodal model on that connector. Nodes appear under the ๐Ÿ‘ MieNodes menu.

Common issues

Your custom recipe isn't in the dropdown. You have to register it first with AddCustomSystemPrompt, then the name shows up here. Registration and use are two separate nodes.

Images do nothing. The source/reference inputs only matter if the connector points at a vision model. On a text-only model they're ignored.

Output doesn't match the target model. Make sure the system_prompt_name you picked matches the model you're actually generating with. Running the ltx2/system recipe and then feeding the result to Flux is a mismatch - pick the recipe for your model.

Big, slow calls. max_tokens is 8192 by default and you can forward multiple video frames, which makes for heavy requests. If you're just doing text-to-image, drop the media inputs and you'll get faster, cheaper runs.

Category๐Ÿ‘ MieNodes/๐Ÿ‘ Prompt Generator

Inputs (12)

NameTypeDefaultDescription
llm_service_connectorLLMServiceConnectorโ€”
input_textSTRINGโ€”
system_prompt_nameCOMBObernini/t2i_a14b_enPick a builtin system prompt (from prompts/*.txt, no placeholders) or one you added via Add Custom System Prompt.
seedINT00โ€“18446744073709550000โ€”
sourceoptIMAGESource image or video-frame batch. Leave unwired for text-only.
reference_imagesoptIMAGEReference image batch (forwarded in full).
reference_videooptIMAGEReference video-frame batch (sampled per reference_video_frames).
video_framesoptINT31โ€“16Frames sampled from the source batch when it is video frames.
reference_video_framesoptINT30โ€“16Frames sampled from reference_video. Default 3 samples 3; 0 = forward all (legacy).
image_detailoptCOMBOauto3 options: auto, low, high
temperatureoptFLOAT0.800โ€“2โ€”
max_tokensoptINT819264โ€“32768Max output tokens. Raise if enhanced prompts get cut off.

Outputs (1)

NameTypeDescription
custom_promptSTRINGโ€”