Add User Kontext Preset ๐
Add your own transformation to the Kontext generator
- success
- log
The Kontext Prompt Generator ships with a menu of preset transformations - Teleport, Relight, Cartoonify, Remove Text, and so on. This node lets you add your own to that menu. You name a preset and write the system prompt that defines how it should rewrite edits, run the node once, and from then on your preset is a selectable option. It's the customization hook for people who've hit the edge of the built-in list.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under Prompt Generator.
Why you'd bother
The built-in Kontext presets cover the common edits, but they're someone else's idea of a transformation. Maybe you keep doing a specific kind of edit - a signature relighting look, a particular product-photo treatment, a stylization that isn't in the list. Rather than re-typing the same guidance into the generator's fields every time, you encode it once as a preset: give it a name, write the instructions, register it. After that it lives in the Kontext generator's dropdown like any factory preset.
This is the same pattern as the pack's AddCustomSystemPrompt node, but scoped to Kontext presets specifically. The KB's prompt-engineering doc is clear that the system-level framing is what really steers an LLM - so owning that framing for your recurring edits is how you get consistent, repeatable Kontext results instead of hand-tuning each one. And since Kontext rewards instructions that carefully pin down what stays and what changes, a well-written preset that bakes in that discipline pays off every time you reuse it.
The inputs and outputs that matter
Two required inputs:
preset_name(STRING) - the label you'll pick from the Kontext generator's dropdown later. Make it recognizable.system_prompt(STRING, multiline) - the actual instructions: how to rewrite an edit request, what to emphasize, what to preserve, tone, length. This is where the value is - write it like a real brief, not a one-liner.
Two outputs:
success(BOOLEAN) - did it register?log(STRING) - the details, including why it failed if it did. Wire either into a show node to confirm.
This is a registration action. You run it once to install the preset, then switch over to the Kontext generator to actually use it - you don't leave it in the hot path of every render.
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. Nodes appear under the ๐ MieNodes menu.
Common issues
success came back false. Read the log output - that's what it's for. Usually it's an empty name or system prompt, or a name that collides with an existing preset.
A lazy system prompt gives lazy edits. "Make it cinematic" isn't a preset, it's a wish. Spell out the transformation the way you'd brief a person: what to change, what to keep, the style you're after. A vague preset is worse than just using a built-in one.
Your preset isn't showing up in the generator. You have to actually run this node once to register it before it appears in KontextPromptGenerator's dropdown. Registration and use are separate steps.
It doesn't generate anything itself. This node only defines a preset - it doesn't produce a prompt or run an edit. Pair it with the Kontext generator (and an actual Kontext model) to see it in action.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| preset_name | STRING | โ | |
| system_prompt | STRING | โ |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | โ |
| log | STRING | โ |