Flux Prompt Builder
Deterministic Prompts Without an API
- positive
- negative
Most prompt-enhancer nodes call an API, cost money, and hand you a slightly different string every run. The Flux Prompt Builder is the opposite: it's a local, deterministic template engine. You pick a subject, a style, a camera, and a lighting setup from dropdowns, and it assembles a production-grade positive prompt plus a matching negative - no network, no key, no randomness. use_grok exists as an upgrade path, but the default path is pure Python.
It's from babydjacNODES, the personal utility pack by solo dev babydjac. This node is arguably the pack's most genuinely useful idea: it codifies the "good Flux prompt" recipe into dropdowns so you don't have to remember it.
How it works
The node builds a positive prompt from the template:
{subject}, style: {style}, camera: {camera}, lighting: {lighting}, [tags: {guidance_tags}], {spice accents}
Spice is the fun one: at higher values it appends aesthetic accents (at 0.8+ you get "film grain subtle, analog bloom"). The negative prompt comes from a base list - lowres, jpeg artifacts, blurry, bad hands, extra limbs and friends - plus whatever you put in forbidden_tags, and the safety_level decides whether NSFW-ish blockers get added (cautious adds the most; raw adds none).
Set use_grok to true and, with a grok_api_key, the frontend can push the template through Grok for a fancier rewrite. There's also a use_canvas_ui flag and a canvas-style UI in the pack's flux_prompt_suite web directory. But the core value is that the local path is repeatable: same inputs, same prompt, every time.
The inputs that matter
- subject - the one thing you always type. Everything else is a dropdown.
- style / camera / lighting - the recipe. "photoreal" + "85mm" + "golden hour" is a very different image than "cinematic" + "macro" + "split." Learning these combos is half the value.
- spice - 0 to 1, default 0.35. Dial it up for film-grainy, moody output; it validates itself (
spice must be in [0.0, 1.0]if you go out of range). - safety_level -
cautious/standard/raw, controlling how aggressively the negative blocks NSFW. - forbidden_tags - defaults to "lowres, blurry, watermark"; add your own per-workflow.
Outputs are positive and negative STRINGs, which wire straight into the positive/negative text encoders in any Flux workflow. The node re-runs when any widget changes (it implements IS_CHANGED), so it always reflects your current settings.
Install
ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes. Restart ComfyUI and hard-refresh the browser - the canvas UI is JavaScript. No extra pip packages.
Gotchas
- It's a template, not a writer. The positive prompt is formulaic - that's the point, and it reads as such. If you want narrative flourishes, use the Grok path or a different node.
prompt_overridesilently wins. If you fill it, the node returns it as the positive and ignores the whole template. It's a deliberate escape hatch, but it has confused people expecting both to combine.- Determinism is the feature. Because there's no API call, you can run a thousand seeds on the same prompt and know the prompt itself never drifted - which is exactly what you want for seed studies and LoRA strength sweeps.
This is the node I'd grab for anyone starting Flux who finds "just write a good prompt" too vague. It's a teaching tool disguised as a utility.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| subject | STRING | vague subject (e.g., portrait in studio) | — |
| style | COMBO | 7 options: cinematic, glamour, artistic nude, editorial, film still, photoreal, +1 | |
| camera | COMBO | 5 options: 35mm, 50mm, 85mm, macro, telephoto | |
| lighting | COMBO | 6 options: softbox, rembrandt, split, rim, golden hour, hdr studio | |
| spice | FLOAT | 0.350–1 | — |
| safety_level | COMBO | 3 options: cautious, standard, raw | |
| use_grok | BOOLEAN | false | — |
| grok_api_keyopt | STRING | — | |
| guidance_tagsopt | STRING | — | |
| forbidden_tagsopt | STRING | lowres, blurry, watermark | — |
| prompt_overrideopt | STRING | — | |
| use_canvas_uiopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |