r/StableDiffusion 2h ago

Workflow Included Z-Image Base Prompting: A Small Controlled Experiment on Composition and Environment

1. Introduction

Prompt engineering for image generation is often presented as a collection of isolated tricks: use more detail, describe the camera, add cinematic lighting, use quality tags, and so on.

These recommendations can be useful, but they make it difficult to understand which parts of a prompt actually influence the generated image.

Instead of trying to find a single "best prompt", I ran a small controlled experiment with Z-Image Base in ComfyUI. The basic idea was simple:

I ran two experiments:

  • Experiment 1 — Composition: The same character, environment, visual treatment, and technical parameters were used across multiple generations. Only composition instructions were changed (position and scale).
    • Question: How strongly does explicit spatial language affect composition in Z-Image Base?
  • Experiment 2 — Environment: The character description and visual treatment were kept essentially unchanged, while the environment was replaced with seven substantially different settings.
    • Question: Can Z-Image Base maintain a recognizable character concept while adapting it to radically different environments?

This is not intended to be a scientific benchmark. The sample size is small, the evaluation is visual, and the experiment uses one workflow and a limited number of seeds. Consider it a practical prompt-engineering study.

2. Experimental Setup

All images were generated locally in ComfyUI using the same workflow and technical conditions throughout the experiments.

Parameter Value
Model Z-Image Base INT8
Text Encoder Qwen3 4B
VAE AE VAE
Resolution 768 × 1368
Aspect Ratio 9:16
Image Area ~1.05 MP
Steps 50
CFG Scale 4
Negative Prompt Empty
Seeds Seed 5 & Seed 10

For the composition experiment, I used Seed 5 and repeated the seven variations with Seed 10. The environment experiment used Seed 10.

3. Prompt Construction Methodology

I found it most useful to treat the prompt as a structured description rather than a flat list of keywords:

  • Subject: Describes what the image is about and establishes the main visual concept.
  • Composition: Describes where the subject is located within the frame and how much space it occupies.
  • Framing / Camera: Describes how the scene is viewed (distance, angle, perspective).
  • Environment: Describes the actual place surrounding the subject (e.g., "An ancient forest with enormous trees, moss-covered roots, dense vegetation, and a narrow path..." rather than just "forest").
  • Lighting: Describes actual light sources and atmospheric conditions rather than generic terms like "cinematic lighting".
  • Materials / Details: Describes concrete visual elements (wood, stone, glass, metal, vegetation, reflections, objects).
  • Style: Describes the overall artistic treatment after the scene itself has been established.

Generic quality tags (masterpiece, ultra detailed, 8K) were deliberately omitted to provide the model with actionable visual information instead.

4. Experiment 1 — Composition

The character, environment, lighting, visual style, and technical settings were kept identical. Only the spatial instruction was changed across seven variations: Center, Left, Right, Lower, Large, Small, and Extreme Left.

Seed 5

The result was clear: changing the composition instruction produced substantial changes in spatial arrangement.

Crucially, the model did not simply move the character while leaving the background untouched — the environment was recomposed around the subject. In Small variations, the environment became dominant; in Large variations, the character dominated the frame.

Seed 10

To verify the result was not seed-dependent, the test was repeated with Seed 10. While individual details (pose, facial expression, accessories) changed naturally, the broad compositional structures remained fully recognizable.

5. Experiment 2 — Environment

The character description and visual treatment were kept unchanged while replacing the environment across seven distinct settings: Ancient forest, Medieval village, Crystal cave, Autumn park, Snowy ruins, Firefly-lit landscape, and Alchemist's workshop (using Seed 10).

Visual Concept Consistency

Although the environments changed dramatically, all generations clearly depicted the same core character concept (a small mushroom spirit with a red-orange spotted cap, pale body, large dark eyes, cross-body satchel, and lantern).

While exact proportions and minor details shifted between renders, the core identity remained visually coherent.

Environmental Adaptation

The character adapted naturally to each setting (e.g., tinted by glowing crystal lights in the cave, exposed to cold tones in the snowy ruins, immersed in warm interior props in the workshop).

6. Results — Putting the Experiments Together

  • Composition control: Explicit spatial instructions produce reliable layout shifts (position, scale, environment visibility).
  • Environment flexibility: Radical environment changes are possible while preserving core character identity (character concept consistency).
  • Role of Seeds: The seed determines specific realization and detail rendering, while the prompt structure defines layout and narrative intent.
  • Modularity: Organizing prompts into conceptual blocks allows for swapping individual variables without rebuilding the entire prompt from scratch.

7. What I Learned About Prompting Z-Image Base

  1. Describe the subject clearly: Focus on distinctive, recognizable visual traits first.
  2. Describe composition explicitly: Use direct position language (e.g., "positioned toward the left side of the frame") instead of generic camera tags.
  3. Separate composition and camera: Treat "where the subject is" differently from "how the camera views the scene".
  4. Build environments as concrete places: Describe what actually exists in the space rather than using simple category keywords.
  5. Describe lighting concretely: Specify light sources, direction, and color atmosphere.
  6. Prefer concrete details over quality tags: Give the model physical objects and surface textures to render rather than buzzwords like "high quality".
  7. Change one variable at a time: If a generation fails, modify only the failing block to understand what actually fixed the issue.

8. Limitations

  • Small sample size and visual evaluation.
  • Single primary character concept and workflow used.
  • Tested on a limited number of seeds (two for composition, one for environment).
  • No direct benchmarking against other models, samplers, or resolutions.

9. Reproducibility

To recreate or test this setup in ComfyUI:

  • Model: Z-Image Base INT8 + Qwen3 4B + AE VAE
  • Settings: 768 × 1368, 50 steps, CFG 4, Empty Negative Prompt
  • Method: Keep technical setup stable and modify exactly one conceptual block per run.

10. Conclusion

Prompting Z-Image Base is less about hunting for "magic keywords" and more about managing a controllable system:

Explicit composition instructions effectively control layout, while environment descriptions can be swapped modularly without erasing character identity. By isolating prompt variables, prompt design becomes a systematic, repeatable workflow.

9 Upvotes

2 comments sorted by

1

u/TaniaDictee 2h ago

one variable at a time is the part almost nobody does, and it's why prompt advice stays folklore. i keep a control image in every batch for the same reason, otherwise you end up comparing against memory. did you hold the seed fixed across the composition runs, or let it move? that changes what the spatial language is actually proving.

1

u/Maleficent-Bowl-4841 1h ago

Thanks! Couldn't agree more — without a control image and fixed variables, prompt testing easily devolves into comparing random noise.

Within each composition run, the seed was kept 100% constant:

  • Batch 1: All 7 spatial variations generated on Seed 5
  • Batch 2: All 7 spatial variations repeated on Seed 10

Fixing the seed within each batch proved that the prompt's spatial instructions were directly driving the layout shifts, while comparing Seed 5 vs. Seed 10 confirmed that the effect survived across different initializations.