TextGen WebUI FLUX Kontext Enhancer
Your oobabooga model as a prompt engineer for Flux Kontext
- image
- flux_edit_instructions
- system_prompt
TextGenWebUIFluxKontextEnhancer ("TextGen WebUI FLUX Kontext Enhancer") is this pack's bridge to oobabooga's Text Generation WebUI. If you already run a local LLM through TextGen WebUI - the de facto launcher for running GGUF/GGML models with a chat interface - this node routes your canvas annotations and edit description through that model and gets back structured editing instructions formatted for Flux Kontext. It's the "use my existing big model instead of a tiny Ollama one" option, and for serious editing chains it's usually the best output of the three generators in this pack, because you can feed it a model that actually understands complex instructions.
Same family as the other generators, different backend: instead of talking to Ollama at 11434, it talks to TextGen WebUI (default http://127.0.0.1:5000) and formats the result specifically for Flux Kontext, which consumes instruction-style prompts - "change the shirt to red" - better than tag soup.
How it works
It connects to TextGen WebUI using dual API support: it tries the OpenAI-compatible endpoint (/v1/models) first, falls back to the native API (/api/v1/model), and populates the model dropdown from whatever the service reports - so the model list is real-time, not hardcoded. Your layer_info (annotation JSON from Super Canvas) and edit_description are combined with a built-in guidance system: a library of commercial-scenario prompt templates plus your chosen editing_intent (product showcase, portrait enhancement, creative design, and more) and processing_style (auto_smart picks automatically; others force a specific approach). Results are cached to avoid hammering the service with duplicate requests.
The model stays loaded between runs unless you check auto_unload_model, which frees VRAM after each generation at the cost of slower subsequent calls. If your model is multimodal, enable_visual_analysis sends the image input along for vision-based prompting.
Inputs and outputs that matter
layer_info- annotation JSON from Super Canvas. The tooltip is honest: can be left empty if you're only usingedit_description.edit_description- what you want done, in words. Combined with the annotations to build the instruction.model- selected from the live-fetched list; showstextgen-webui-model-not-founduntil the service is reachable.editing_intentandprocessing_style- the two enums that shape the guidance.auto_unload_model- off by default (keep model loaded); on to free memory after each run.- Optional:
url(service address),temperature,seed,enable_visual_analysis,custom_guidance(only used withprocessing_style = custom_guidance), plussave_guidance/guidance_name/load_saved_guidancefor persisting custom guidance templates.
Outputs: flux_edit_instructions (STRING) - wire this into your Flux Kontext text input - and system_prompt (STRING), the guidance system prompt that produced it, useful for debugging or reuse.
Installing it
Install the pack (ComfyUI Manager → "Kontext Super Prompt" or git clone https://github.com/aiaiaikkk/super-prompt-canvas), restart, then make sure TextGen WebUI is running with its API enabled:
# from the oobabooga install
python server.py --api
The node's README framing is that it "auto-detects" the service - practically, start TextGen WebUI first, then add the node so the model list populates.
Where people get burned
The obvious one: nothing works until TextGen WebUI is up with --api. The textgen-webui-model-not-found placeholder model is your cue the service isn't reachable - check the port, check the URL (some setups run on 5000, others behind a proxy). enable_visual_analysis does nothing on text-only models, so don't be confused by the checkbox doing nothing for you. And unchecking auto_unload_model to keep the LLM resident is great for speed but eats VRAM that your Flux Kontext edit pass wants - on a 12 GB card you'll want it on. Small models here give the same shallow results as the Ollama path; this node only pays off with a model big enough to follow multi-part instructions.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| layer_info | STRING | Annotation JSON data from Super Canvas. Can be left empty if only using Edit Description. | |
| edit_description | STRING | Describe the editing operations to perform. This will be combined with annotation data to generate precise instructions. | |
| model | COMBO | textgen-webui-model-not-found | Select a TextGen WebUI model. The list is fetched in real-time from the TextGen WebUI service. |
| auto_unload_model | BOOLEAN | false | Automatically unload the model after generation to free up memory. Keep unchecked to maintain the model loaded throughout the session. |
| editing_intent | COMBO | general_editing | Select your editing intent: What type of result do you want to achieve? The AI will automatically choose the best technical approach based on your intent. |
| processing_style | COMBO | auto_smart | Select the AI processing style: auto_smart will intelligently choose the best approach, others provide specific processing styles. |
| imageopt | IMAGE | Optional: Image for visual analysis (only for multimodal models). | |
| urlopt | STRING | http://127.0.0.1:5000 | TextGen WebUI service address. |
| temperatureopt | FLOAT | 0.70.1–1 | Controls creativity. Higher values mean more creative responses. |
| seedopt | INT | 420–4294967295 | Seed for controlling randomness. Use the same seed for reproducible results. |
| enable_visual_analysisopt | BOOLEAN | false | Enable visual analysis (only effective for multimodal models that support vision). |
| load_saved_guidanceopt | COMBO | none | Load previously saved custom guidance (used when processing_style is 'custom_guidance'). |
| save_guidanceopt | BOOLEAN | false | Enable to save the current custom guidance text to a file. |
| guidance_nameopt | STRING | My Guidance | The name of the file to save the guidance to. |
| custom_guidanceopt | STRING | Enter custom AI guidance instructions (used when processing_style is 'custom_guidance'). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| flux_edit_instructions | STRING | — |
| system_prompt | STRING | — |