📦 Kontext Presets (OreX)
The prompt kitchen behind FLUX Kontext edits
- text prompt
- manual prompt from file
If you've ever tried a FLUX.1 Kontext workflow, you know the awkward part isn't the model - it's feeding it good instructions. Kontext is BFL's in-context image editor: you give it an image plus a sentence ("teleport the subject to a beach at sunset") and it edits without touching your subject's identity. The quality of that sentence is half the battle, and that's exactly what Kontext Presets (OreX) is built for. It's a prompt-assembly node that stacks a start instruction, your manual prompt, a preset's system text, and an end instruction into one clean prompt for a local LLM - usually the OreX Ollama or LM Studio node sitting right next to it.
How it works
The node is a string assembler with opinionated defaults. Its start_instruction ships pre-filled with the famous Kontext-style opener - "You are a creative prompt engineer. Your mission is to analyze the provided image and generate exactly 1 distinct image transformation..." - the same phrasing the community's "Kontext Presets - All System Prompts" resource (a +283 thread on r/StableDiffusion) popularized. That framing turns a local LLM into a transformation-instruction generator rather than a chatbox.
The preset dropdown holds 20 transformation templates like Komposer: Teleport, Move Camera, Relight, Product, Colorize, Movie Poster and Remove Text, each one a short English system line (with Russian comments baked into the config). Toggle Enable_Preset to mix one in. There's a second, separate set for your own templates: edit OreXKontextPresetsManual.json in the pack folder and your entries show up under Manual_Preset / manual_preset.
The clever bit is the *image* wildcard. Preset text like "Teleport the subject of *image* to a random location" gets the literal image description substituted in - feed an image-captioning node into image_description, keep image_description_enabled on, and the LLM gets a textual description of what's actually in the frame, which matters a lot for vision models doing real edits.
Inputs and outputs that matter
For a beginner, four fields do the real work:
start_instruction- the global system prompt; defaults to the prompt-engineer opener.manual_prompt- your actual request, with*image*wildcard support.preset/Enable_Preset- pick one of the 20 transformation templates.image_description- plug in an image caption so the wildcard resolves.
The node outputs two strings: text prompt (the assembled prompt - wire this into your LLM node's text_input) and manual prompt from file (every custom preset dumped as readable text, handy if you want to inspect what you wrote). Nothing here calls an LLM itself; it's pure text construction, so it's instant and has zero dependencies beyond the pack.
Install
ComfyUI Manager (search "comfyui-OreX") or:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
Restart ComfyUI. The pack's only real requirements are Pillow and soundfile; no model downloads for this node. Note the README's opening line, which is worth heeding with a grain of salt: this pack updates fast, and if a node misbehaves after an update the author's own advice is to delete the folder and re-clone rather than patch around it.
Where people get burned
Kontext itself is heavily censored at the weights level and the Dev license's anti-circumvention clause makes NSFW LoRAs license violations - plan around that before you build an editing pipeline on it. And remember this node only writes prompts; if you see garbage output, check the LLM, not the preset. It's the kitchen, not the chef.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| start_instruction | STRING | You are a creative prompt engineer. Your mission is to analyze the provided image and generate exactly 1 distinct image transformation. | — |
| manual_prompt | STRING | — | |
| image_description_enabled | BOOLEAN | true | — |
| image_description | STRING | — | |
| Enable_Preset | BOOLEAN | true | — |
| preset | COMBO | Komposer: Teleport — Телепорт сцены | 20 options: Komposer: Teleport — Телепорт сцены, Move Camera — Перемещение камеры, Relight — Переосвещение, Product — Предметная съёмка, Zoom — Увеличение объекта, Colorize — Колоризация, +14 |
| Manual_Preset | BOOLEAN | false | — |
| manual_preset | COMBO | ➖ Zoom: объекта сцены | 24 options: ➖ Zoom: объекта сцены, ➖ Relight — Изменяем освещение, ➖ Удалить всю мебель из комнаты, ➖ Удалить весь текст, ➖ Заменить обои, пол и другие объекты интерьера, ⏩ Фотография продукта, +18 |
| end_instruction | STRING | . Your response must consist of concise instruction ready for the image editing AI. Do not add any conversational text, explanations, or deviations; only the instructions. Give your answer in one line without formatting, in English. Fit the answer into 512 tokens. | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text prompt | STRING | — |
| manual prompt from file | STRING | — |