Krea2 Prompt Harness
The Node That Throws Away a Bad Answer
- Clean Prompt
If you've wired an LLM into a ComfyUI graph, you already know the failure mode. Nine queues in, the model stops being a prompt engineer and starts being a chatbot: "I'm sorry, I can't help with that", or it helpfully writes a paragraph about the prompt, or it echoes the system message back at you, or it answers in Chinese because your encoder is Qwen and Qwen has opinions. You get an image of nothing in particular and no error message anywhere.
Krea2 Prompt Harness is the bouncer between Stage 1 TextGenerate and everything downstream. It takes the model's answer, decides whether it's usable, and either cleans it or replaces it with your original prompt.
How the cleaning works
Two layers, and it's worth knowing which is which.
The first is literal text hygiene. The node strips markdown code fences, leading Prompt: / Final prompt: style labels, bullet dashes, assistant: and user: role prefixes, and any ... reasoning block. If it finds a refusal or a system-role echo - the source matches things like "i'm sorry", "i cannot", "as an ai", "not permitted", "guidelines", "your job is to" - it discards the answer and returns the fallback.
The second layer is heuristic drift detection. The node compares the model's output against your original prompt and falls back if obvious things appear that you never asked for: an extra human, animal, vehicle or location, or a changed medium. In this node the entity guard is on and medium drift is only tolerated where a broad environment prompt makes photographic wording reasonable; a couple of protections are deliberately fixed off, notably the focus-blur guard and the profile-face-detail guard. That asymmetry is intentional across the pack - Stage 1 is allowed to introduce focus and depth language, and the Stage 2 node exists partly to claw it back before the image model sees it.
Inputs and outputs
prompt(required) - the Stage 1 TextGenerate result.original_main_prompt(required) - the original text from Krea2 Prompt. It plays two roles: it's the fallback text and the source ledger the drift checks compare against.- Clean Prompt - the sanitized Stage 1 prompt. Wire it into
clean_prompton Krea2 Prompt–Moodboard Compiler and intofallback_prompton Krea2 Moodboard Harness. Both wires, same output.
Where people get burned
Output identical to your input isn't a broken node. If the model returned a refusal, a protocol echo, or an answer in Chinese while your source was English, the node hands you back your raw main prompt. That is the intended behaviour - a boring image beats a broken one - but it looks exactly like a disconnected wire. If several queues in a row come back as your untouched prompt, the LLM is the problem, not the graph.
It's a heuristic with an opinion about your creativity. Drift detection can reject an expansion that added something you'd have liked. The cost is a blander image, not a crash, and the fallback is graceful, so this is a fair trade. But if you keep seeing your raw prompt survive, put a Show Text node on Clean Prompt before the compiler and read what actually came through - they're cheap and they end a lot of guessing.
You can't type into these fields. Both inputs are forced connections, so prompt and original_main_prompt render as sockets, not text boxes. A missing wire is an error when you queue, not an empty string that quietly passes through.
Non-English main prompts change the calculus. The node ignores the fallback if your source prompt is CJK, so a Chinese main prompt passes through normally. It's English source + Chinese answer that gets thrown out. Which is the correct call, and still worth knowing before you file a bug.
Installing it
ComfyUI Manager, search Krea2 Harness - the pack installs all six nodes at once. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ANe5s/ComfyUI-Krea2-Harness.git
Then fully restart ComfyUI (a page refresh won't reload Python nodes). Everything lands under Nodes → ANe5s Nodes → Krea2. No additional Python dependencies; Python 3.10+ and ComfyUI 0.3.0+ only.
The node itself needs no models - it's pure string processing. It only becomes useful with a working Stage 1 in front of it, which means Qwen3-VL as the text encoder, a Krea 2 Turbo checkpoint and the Qwen-Image VAE, none of which this pack ships. The example workflows in the repo's examples/ folder wire all of this up already, and each one's MarkdownNote lists the model files and where they go. If the pack's nodes don't appear in your menu at all, check the ComfyUI startup log for a custom-node import error before you touch anything else.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Stage 1 V257 generated prompt. | |
| original_main_prompt | STRING | Original main prompt used for both fallback and source-ledger roles. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Clean Prompt | STRING | Sanitized Stage 1 prompt. |