Z-Image Turbo Prompt Engineer
The Fast Path to a Turbo-Ready Prompt
- reference_image
- optimized_prompt
- cfg
- steps
- status_info
- expert_breakdown
Z-Image Turbo is the distilled daily driver: 6B parameters, 8 steps, CFG 1, sub-minute images on a 12GB card, and - because it's guidance-distilled - negative prompts that do literally nothing. So it makes sense that this node, the Turbo sibling of the pack's Z-Image Base studio, is the simplified one: fewer knobs, and notably, no negative prompt output at all. That's not an omission, it's the model talking.
Z-Image Turbo Prompt Engineer is what you reach for when you're actually generating with Turbo and you want a prompt plus matching sampler settings in one shot, without hand-assembling the photo-nerd vocabulary.
How it works
Like its Base sibling, it has an API path and a local fallback.
With a Grok key: the system prompt is a gloriously overwrought Chinese-language character - a "vision artist locked in a logic cage" who's allergic to metaphor and must expand your concept into a dense, concrete visual description, quoting any in-image text exactly in English quotation marks. It's a real prompt-engineering technique: forcing exact text rendering via quotes, and forbidding meta-tags. The response comes back as a single prompt string, and the node returns it along with CFG 1.0 and 8 steps (unless Grok returns a JSON override).
Without a key: the static path is smarter than the Base one. It has a constraint-rewriting table - "no blur" becomes "sharp focus, crisp details," "dark/dim" becomes "well-lit, bright," "ugly" becomes "well-proportioned" - so your negative-ish phrasing gets converted into positive instructions, which is the only kind Turbo understands. Then it appends your style/camera/lighting/framing phrases.
The inputs that matter
- text_input - your concept, in plain prose. Same rule as Base: Turbo's encoder is a Qwen LLM, so sentences beat tags.
- quality_preset - Speed / Balanced / Max Quality. These actually move the sampler numbers: Speed gives CFG 1.0 / 8 steps, Balanced 1.0 / 8 (or 1.1 / 10 for longer prompts), Max Quality 1.2 / 12. All of it hugs the community's 8–9 steps at CFG 1 sweet spot.
- style, camera, lighting, framing - the four dropdowns, each with photographic options like "Annie Leibovitz lighting style" and "Zeiss Otus lens detail." Leave at None and you get your idea plus Turbo's defaults.
- grok_api_key / reference_image - optional; the key flips to the Grok path, and the reference image gets base64'd to Grok Vision if you're working image-to-image.
Five outputs: optimized_prompt, cfg, steps, status_info, expert_breakdown. The first three wire straight into your sampler; status_info tells you whether Grok or static logic produced the prompt.
Install
Standard pack deal:
cd ComfyUI/custom_nodes
git clone https://github.com/babydjac/babydjacNODES
# restart ComfyUI
Or search "babydjacNODES" in ComfyUI Manager. No model files, no extra pip packages - requests and torch are already there. The Grok path needs an xAI key; the fallback path needs nothing.
Where people get burned
- It's Turbo-only. If your checkpoint is Z-Image Base, you're leaving the negative prompt and CFG headroom on the table - use the Base studio node instead.
- The static path is fine, the Grok path is the upgrade. Without a key you get the constraint-rewriter, which is decent but shallow; the real value is Grok's dense visual descriptions.
- Trust the cfg/steps outputs. This node's whole trick is handing you settings that match Turbo's distillation - but if you're running a GGUF quant or a merged fine-tune, sanity-check the numbers rather than trusting them blindly.
For the current local-photorealism default, this is the node in the pack you'll actually build a daily workflow around.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| text_input | STRING | — | |
| style | COMBO | Ultra-sharp hyperrealism | 11 options: None, Ultra-sharp hyperrealism, Fashion editorial (e.g., Vogue-style), Cinematic color grading, IMAX film realism, Photojournalistic documentary style, +5 |
| camera | COMBO | None | 11 options: None, Shot on a Canon EOS R5, Captured with a Sony A1, Nikon Z9 full-frame sensor, Medium format Fujifilm GFX100 II, Leica SL2 Summilux lens, +5 |
| lighting | COMBO | None | 11 options: None, Rembrandt lighting, Softbox key light with rim light, Golden hour lighting, Overcast diffused lighting, Harsh hard-light shadows (film noir style), +5 |
| framing | COMBO | None | 11 options: None, Rule of thirds composition, Portrait shot, eye-level, Cinematic wide-angle shot, Close-up with bokeh background, Dutch angle (tilted perspective), +5 |
| quality_preset | COMBO | Balanced | 3 options: Speed, Balanced, Max Quality |
| grok_api_keyopt | STRING | — | |
| grok_modelopt | COMBO | grok-2-vision-1212 | 17 options: grok-4-1-fast-reasoning, grok-4-1-fast-non-reasoning, grok-code-fast-1, grok-4-fast-reasoning, grok-4-fast-non-reasoning, grok-4-0709, +11 |
| reference_imageopt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| optimized_prompt | STRING | — |
| cfg | FLOAT | — |
| steps | INT | — |
| status_info | STRING | — |
| expert_breakdown | STRING | — |