Custom System Prompt Generator ๐
The one prompt generator that runs any system prompt
- llm_service_connector
- source
- reference_images
- reference_video
- custom_prompt
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. Defaultbernini/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) andreference_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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_service_connector | LLMServiceConnector | โ | |
| input_text | STRING | โ | |
| system_prompt_name | COMBO | bernini/t2i_a14b_en | Pick a builtin system prompt (from prompts/*.txt, no placeholders) or one you added via Add Custom System Prompt. |
| seed | INT | 00โ18446744073709550000 | โ |
| sourceopt | IMAGE | Source image or video-frame batch. Leave unwired for text-only. | |
| reference_imagesopt | IMAGE | Reference image batch (forwarded in full). | |
| reference_videoopt | IMAGE | Reference video-frame batch (sampled per reference_video_frames). | |
| video_framesopt | INT | 31โ16 | Frames sampled from the source batch when it is video frames. |
| reference_video_framesopt | INT | 30โ16 | Frames sampled from reference_video. Default 3 samples 3; 0 = forward all (legacy). |
| image_detailopt | COMBO | auto | 3 options: auto, low, high |
| temperatureopt | FLOAT | 0.800โ2 | โ |
| max_tokensopt | INT | 819264โ32768 | Max output tokens. Raise if enhanced prompts get cut off. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| custom_prompt | STRING | โ |