WAN Prompt Builder (Groq)
The node that writes your Wan 2.2 prompt so you don't have to
- positive
- negative
Wan 2.2 prompting is picky in a specific, annoying way. The model wants roughly two sentences: sentence one describes the subject doing exactly one action, sentence two covers camera and mood. No "then", no "as", no action chaining - the community learned this the hard way, because every chain produces muddled motion and jarring cuts. This node is the "write it for me" button. You type what's in the shot, it hands back a clean WAN-optimized prompt via Groq, and you wire the result straight into a standard Wan T2V workflow.
It's the simplest of the three nodes in the ComfyUI-WanPromptBuilder pack, and the one the other two are built on. Single segment, single prompt, two outputs.
How it works
Under the hood it sends your subject, action, camera move, lighting, style, and an intensity level to Groq's chat completions API (llama-3.3-70b-versatile, same model behind the free tier). The system prompt bakes in the strict Wan 2.2 rules: one action per segment, no chaining, camera + atmosphere in sentence two, output only the prompt.
The part worth caring about is the failure handling. If the API times out, your key is wrong, or the request just dies, the node silently falls back to a locally-built template prompt instead of erroring. Your workflow keeps running, which matters because ComfyUI treats a crashed node as a crashed graph. You'll know it happened because the output reads mechanical - and the ComfyUI console prints [WanPromptBuilder] Error ... falling back.
The inputs that matter
- subject and action - plain text, and the defaults (
a T-Rex charging through mud) are the author's sense of humor, not a recommendation. - camera_move - 9 options from
slow push intoorbit lefttohandheld shake, plusfreeto let the model decide. - lighting - 8 moods: dramatic, golden hour, neon, moonlight, and so on.
noneskips it. - action_intensity - 1–5. This is the sleeper feature: level 1 is "micro-motions only, like breathing", level 5 is "maximum kinetic energy". It's the single knob that keeps energy consistent across a longer piece.
- api_key - your Groq key. Free tier is genuinely enough for personal use.
Outputs are positive and negative, both plain strings. Wire positive into a CLIP Text Encode (positive) node and negative into the negative conditioning in any standard Wan 2.2 text-to-video workflow.
Installing it
ComfyUI Manager is easiest - search "WanPromptBuilder" and install. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/jideka/ComfyUI-WanPromptBuilder
Restart ComfyUI and you'll find the nodes under WAN > prompting. There's no requirements.txt in the pack - it uses requests, numpy, and Pillow, all of which ship with ComfyUI already. No model downloads, no VRAM cost, nothing heavy. The only real requirement is the Groq key, which takes two minutes at console.groq.com.
Where people get burned
Two things. First, the README says it saves your API key to config.json so you don't re-enter it. The shipped code only reads that file - nothing ever writes it. Either paste the key into the node each time, or edit config.json yourself (it sits in the pack folder with a placeholder value).
Second, the class name is WanPromptBuilderGrok - spelled with a "k". It's Groq, the API provider, and it's a typo that survived to release. Harmless, but it'll trip you up when you search your own workflow JSON.
If you get fallback-looking output, check three things: the key (paste it fresh - Groq free keys expire), your internet connection, and the console log. The node is small, new, and written by one person as a work-in-progress, so treat odd behavior as a bug worth reporting rather than something you did wrong.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| subject | STRING | a T-Rex | — |
| action | STRING | charging through mud | — |
| camera_move | COMBO | 9 options: free, slow push in, slow pull out, orbit left, orbit right, crane up, +3 | |
| lighting | COMBO | 8 options: none, dramatic, golden hour, overcast, neon, studio, +2 | |
| action_intensity | INT | 21–5 | — |
| style | STRING | cinematic, 4K, photorealistic | — |
| api_key | STRING | You groq key here | — |
| negativeopt | STRING | blurry, static camera, low quality, watermark, text, deformed, artifacts, flickering, overexposed | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |