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

  1. Open ComfyUI Manager.
  2. Install ComfyUI-Impact-Pack by ltdrdata.
  3. 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

  1. Load your Z-Image Turbo workflow template.
  2. Insert ImpactWildcardProcessor before text encoding.
  3. Connect processed text output to your positive prompt input (or use ImpactWildcardEncode directly before CLIP/Text encode path).
  4. Set mode to Populate for automatic generation each queue run.

4.4 Run automatic iterations

  1. Set desired queue count (for example: 20 runs).
  2. Click Queue Prompt.
  3. 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

  1. Keep a fixed negative prompt baseline across all runs.
  2. Lock resolution and seed behavior for the first pass if you want comparability.
  3. Generate 30–50 candidates with wildcard variation.
  4. Shortlist top 5.
  5. Re-run finalists with tighter prompts + optional upscaling/refinement workflow.

7) Troubleshooting

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.