😺NKD Klein Prompt Builder
Build the sentence Klein actually understands, from dropdowns
- prompt
If you came to Klein from SDXL, your prompt habits are quietly working against you. Klein's text encoder is a Qwen3 LLM, and it reads your prompt like a chat instruction, not a tag list. masterpiece, best quality, ultra detailed is inert. (word:1.3) weighting is discarded. What works is a flowing sentence - a realistic photo of a woman sitting on a beach, the ocean behind her. NKD Klein Prompt Builder exists because writing that sentence well is fiddly: it assembles a prompt from your own text plus curated preset dropdowns, with a live preview of the result, and outputs a string you wire straight into Presampling's positive input.
It's the newest node in the NKD Klein Tools pack (added in 1.10.x), and it's optional - a convenience that turns prompt crafting into "type the subject, pick from a few menus."
How it works
You type your subject into user_prompt, and it's always placed first - the node's own tooltip says word order matters most to Klein, which lines up with how an LLM encoder works: the subject leads, everything else qualifies it. Then you pick from the dropdowns:
- medium - photo, painting, render, illustration…
- style - the overall artistic treatment
- lighting - the tooltip notes lighting has the biggest impact on the look, so it's worth setting
- camera_angle, lens_shot, composition, mood, color_grade - framing and atmosphere
Leave any dropdown on "-" to skip it. extra appends anything the dropdowns don't cover, exactly as typed. The format switch chooses how it's assembled: natural produces a flowing sentence (recommended for Klein), while json produces a structured template - handy for automation, and the KB's note that structured JSON works well with Flux 2 models isn't hype, it's a real documented approach for this encoder family.
The output is a single prompt STRING with a live preview as you go - connect it to Presampling's positive and you're done.
Customizing the presets
The dropdown options live in a file called klein_presets.json inside the pack folder. Open it, add, remove, or reword presets to your taste, then restart ComfyUI. That's the whole customization story - no Python, no editing the node. It's a nice touch if you work in a consistent style and want your usual "cinematic, teal-and-orange, 35mm" menu entries one click away.
Installing
Search NKD Klein Tools in ComfyUI Manager, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/Nekodificador/ComfyUI-NKD-Klein-Tools
Restart ComfyUI. No pip dependencies - requirements.txt is empty, so this won't fight your other nodes. You need a Flux Klein model loaded (4B or 9B with its Qwen3 encoder and VAE); the pack provides no weights.
Common issues
- The negative prompt won't save you. This is the bigger one, and it's worth saying plainly: at CFG 1, the negative prompt is basically inert for Klein. If a result has something you don't want, don't fight the negative box - rephrase the positive, or use the model's actual levers (steps, CFG 1.2–1.5, a LoRA).
- Editing presets doesn't take effect until restart. The file is read when the node loads; a restart is required, and the README says so.
- "Why does my tag list do nothing?" Because it's being read as an LLM instruction. If the output still looks like a tag soup, let Prompt Builder assemble a natural sentence - that's the mode Klein was designed around.
Chain it in and it slots right in front of the pack's usual setup:
NKD Klein Prompt Builder → NKD Klein Presampling (positive) → [your sampler] → NKD Klein Postsampling
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| user_prompt | STRING | Your main description — the subject of the image. It is always placed first, because word order matters most to Klein. | |
| format | COMBO | natural | natural: a flowing sentence (recommended for Klein). json: a structured template, handy for automation or other FLUX.2 models — usually flattened to prose before use. |
| medium | COMBO | — | The kind of image: photo, painting, render, illustration… |
| style | COMBO | — | The overall artistic style or treatment. |
| lighting | COMBO | — | How the scene is lit. Lighting has the biggest impact on the look, so it's worth setting. |
| camera_angle | COMBO | — | Where the camera looks from. |
| lens_shot | COMBO | — | Focal length and how close the shot is framed. |
| composition | COMBO | — | How the frame is arranged. |
| mood | COMBO | — | The emotional tone or atmosphere. |
| color_grade | COMBO | — | Overall color treatment or film stock. |
| extraopt | STRING | Any extra detail to append at the end, exactly as typed. Use this for anything the dropdowns don't cover. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | The assembled prompt. Connect to Presampling's positive. |