ComfyUI + Z-Image Turbo: Automatic Prompt Iterations (Step-by-Step)
Last Updated: Friday, 02/27/2026
Goal: Generate many Z-Image Turbo outputs automatically by iterating prompts (randomized or controlled) without manual prompt rewriting each run.
1) Source References Used
2) Install/Verify Z-Image Turbo Core Files
Place these model files in the exact folders:
ComfyUI/models/text_encoders/qwen_3_4b.safetensors
ComfyUI/models/diffusion_models/z_image_turbo_bf16.safetensors
ComfyUI/models/vae/ae.safetensors
Official files:
3) Install Nodes for Prompt Iteration
- Open ComfyUI Manager.
- Install ComfyUI-Impact-Pack by
ltdrdata.
- Restart ComfyUI and refresh browser.
Why this pack: it provides ImpactWildcardProcessor and ImpactWildcardEncode so each queued run can produce a new prompt automatically.
4) Method A (Recommended): Automatic Random Prompt Iterations via Wildcards
4.1 Create wildcard files
Create text files in:
ComfyUI/custom_nodes/ComfyUI-Impact-Pack/custom_wildcards/
Example files:
# subject.txt
teacher in classroom
school administrator in office
speech therapist with student materials
# style.txt
photo realistic, natural light
cinematic, soft contrast
editorial portrait lighting
# action.txt
reviewing documents
speaking to a small team
using a laptop at desk
4.2 Build wildcard prompt
In ImpactWildcardProcessor wildcard field, use:
__subject__, __action__, __style__, high detail, clean composition
You can also use inline dynamic syntax:
{golden hour|overcast daylight|studio softbox}, {35mm|50mm|85mm} lens look
4.3 Connect to Z-Image Turbo workflow
- Load your Z-Image Turbo workflow template.
- Insert
ImpactWildcardProcessor before text encoding.
- Connect processed text output to your positive prompt input (or use
ImpactWildcardEncode directly before CLIP/Text encode path).
- Set mode to Populate for automatic generation each queue run.
4.4 Run automatic iterations
- Set desired queue count (for example: 20 runs).
- Click Queue Prompt.
- Each run resolves wildcard values into a fresh prompt variation.
5) Method B: Controlled Weighted Variations
Use weighted selection syntax to bias frequency:
{7::photo realistic|3::cinematic|1::illustrative}
This keeps iterations automatic but steers output distribution toward preferred styles.
6) Practical Iteration Strategy for High-Quality Batches
- Keep a fixed negative prompt baseline across all runs.
- Lock resolution and seed behavior for the first pass if you want comparability.
- Generate 30–50 candidates with wildcard variation.
- Shortlist top 5.
- Re-run finalists with tighter prompts + optional upscaling/refinement workflow.
7) Troubleshooting
- No variation across runs: verify wildcard mode is Populate, not Fixed.
- Wildcard token appears literally (e.g., __subject__): check filename/path and spelling in
custom_wildcards.
- Node missing after workflow load: update ComfyUI + restart after installing Impact Pack.
- Z-Image model not listed: confirm file paths and press refresh in ComfyUI model list.
8) Minimal Example Prompt Set (copy/paste)
Positive:
__subject__, __action__, __style__, professional composition, detailed face, realistic skin texture
Negative:
blurry, deformed hands, extra fingers, low quality, over-sharpened, text artifacts
Result: You now have a repeatable, automatic prompt-iteration pipeline for Z-Image Turbo in ComfyUI.