KoboldCpp Prompt Amplify
Rough idea in, model-ready prompt out
- amplified_text
- secondary_instructions
- width
- height
This is the flagship node of the pack, and it earns it. KoboldCpp Prompt Amplify takes a short, rough prompt - "a girl in the rain with a red umbrella" - and rewrites it into something a diffusion model can actually paint, using a local LLM running on your own machine. No API key, no cloud, no censorship layer, no per-call cost. The KB calls this the most common LLM-in-the-graph job, and this node is one of the better implementations of it: it's the same rewrite engine Prompt Studio's chat interface uses, exposed as a plain node you can drop into any workflow.
The typical graph is about as simple as it gets:
primitive text → KCPP_PromptAmplify → positive text encoder → sampler
Type your idea in a text primitive, let the node expand it, feed the result to the encoder. If you've ever tried to hand-format a prompt for a tag-based anime model and a natural-language photoreal model in the same week, you'll appreciate what this does.
How it works
The node talks to KoboldCpp's OpenAI-compatible Chat Completions endpoint (the raw KCPP_Apply node uses the older native endpoint instead). It builds a rewrite request from the inputs, sends it, and returns the model's answer as amplified_text. Native thinking (the thinking_mode input) is kept in Chat Completions' separate reasoning_content field, so only the clean final answer reaches your image workflow - no leaked scratch-work, which is the classic reasoner failure the KB warns about.
The inputs that matter:
text- your rough idea. This is the input to amplify.model_profile- the grammar the rewrite follows: General Natural Language, Tag-Based Anime Model, or Tag-Based Photorealistic Model. This is the single most important setting; pick the one that matches your checkpoint's prompting style.style_preset(111 options) andframing_preset(32 options) - reusable aesthetic and composition guidance. There's real overlap with things like SDXL style/quality tags, but they're tuned as LLM instructions.embellishment_level- how much the rewrite expands your text, fromNone(no added detail) toUltra Maximum(~120–160 words). Start atCleanand climb only if you want more prose.thinking_mode- Disabled through High. Reasoning modes cost context and tokens; leave Disabled unless you're chasing quality.secondary_instructions- optional, and important: phrases like LoRA trigger words that pass through to the second output unchanged and never enter the LLM request.aspect_ratio,megapixels,multiple- compute the optionalwidth/heightoutputs with the same presets as ComfyUI's Resolution Selector.
The rest are KoboldCpp request knobs (URL, token allowance, temperature, penalties). max_response_tokens of 0 uses the selected profile's default.
Outputs: amplified_text (→ text encoder), secondary_instructions, and width/height (INT) for latent sizing.
Installing it
One clone for the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio
Restart ComfyUI, or search "ComfyUI_PromptStudio" in ComfyUI Manager. No pip dependencies - the node just needs a local KoboldCpp server at http://localhost:5001 (default), Ollama at 11434, or llama.cpp at 8080. For KoboldCpp specifically: use 1.117.1+, enable Use Jinja in the server, and restart it - the node refuses to run with generic chat formatting rather than silently degrading.
Where people get burned
- "Use Jinja" not enabled. The node errors out on purpose. Enable it in KoboldCpp and restart the server.
- VRAM contention on one GPU. This is the classic KoboldCpp+ComfyUI problem: the LLM and the diffusion model fight over your card. Prompt Studio's shared-GPU handoff (which unloads the LLM before ComfyUI queues) requires KoboldCpp Admin Mode with an Admin Directory. Without it, expect OOMs or a red status dot. Don't enable "Keep models loaded" unless the two run on separate GPUs.
- Double amplification. If this node sits in a
[PS]workflow, Prompt Studio converts it to a Prompt Slot in the temporary snapshot it queues - so Studio never amplifies twice. On a normal ComfyUI queue, the amplification happens exactly once, as you'd expect. - Wrong profile → wrong vibe. A tag-based anime model doesn't want your natural-language photoreal phrasing. If output looks off, switch
model_profilebefore touching samplers.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| additional_instructions | STRING | Optional extra guidance for this run without editing model_profiles.json. | |
| model_profile | COMBO | 3 options: General Natural Language, Tag-Based Anime Model, Tag-Based Photorealistic Model | |
| style_preset | COMBO | 118 options: None, Neutral, Casual Snapshot, Amateur Photography, Candid Photography, Tag Dense, +112 | |
| style_modifier | STRING | Optional aesthetic/style guidance added to the selected style preset. Select None for modifier-only behavior. | |
| framing_preset | COMBO | 32 options: None, Selfie, Mirror Selfie, Candid Unaware, Close-Up Portrait, Medium Shot, +26 | |
| framing_modifier | STRING | Optional framing/composition guidance added to the selected framing preset. Select None for modifier-only behavior. | |
| thinking_mode | COMBO | Disabled | Private-reasoning limits: Minimal 200 tokens, Low 500, Medium 1000, and High uses the available context window. |
| embellishment_level | COMBO | Clean | Controls how much the prompt is expanded or polished after style conversion. |
| kobold_url | STRING | http://localhost:5001 | Base URL for the local KoboldCpp server. |
| max_response_tokens | INT | 00–8192 | Final-answer token allowance. Use 0 to use the profile default. Native reasoning receives an additional budget within the server context window. |
| temperature | FLOAT | 0.250–5 | — |
| top_p | FLOAT | 0.800–1 | — |
| top_k | INT | 400–200 | — |
| min_p | FLOAT | 0.000–1 | — |
| rep_pen | FLOAT | 1.050.5–3 | — |
| rep_pen_range | INT | 3600–4096 | — |
| sampler_seed | INT | -1-1–999999 | -1 lets KoboldCpp choose a random seed. |
| stop_sequence | STRING | Optional stop sequences, one per line. | |
| request_timeout | INT | 1205–600 | HTTP timeout in seconds. |
| secondary_instructionsopt | STRING | Optional phrases returned unchanged through the secondary_instructions output, such as LoRA trigger words. | |
| aspect_ratioopt | COMBO | 1:1 (Square) | The aspect ratio for the output dimensions. |
| megapixelsopt | FLOAT | 1.00.1–16 | Target total megapixels. 1.0 MP ≈ 1024x1024 for square. |
| multipleopt | INT | 88–128 | Nearest multiple of the result to set the selected resolution to. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| amplified_text | STRING | — |
| secondary_instructions | STRING | — |
| width | INT | — |
| height | INT | — |