Text-to-Image Model Selection and Prompt Engineering: A Practical Guide
This guide explains why generating an image is not the same as delivering production-ready visual assets, and how to evaluate text-to-image models under strict constraints. It introduces a reusable five-dimension scoring framework, a structured approach to prompt engineering, common failure modes and their causes, and engineering practices for turning single-image generation into stable production capacity. Model selection recommendations are matched to specific scenarios rather than a single "best" model.
1. Background: Why “It Generates an Image” Is Not “It Can Ship”
As multimodal generation technology evolves quickly, text-to-image capability has moved from “producing an image that looks decent” to “producing an image that can be used directly for commercial delivery.” The comparison scenario in the source material is highly representative: a vertical 3:4 poster celebrating a victory in a crossover fighting game, requiring two characters from different fictional worlds in the same frame. It must deliver the photorealistic quality of AAA promotional key art, blend ink-wash brushwork with graphic typography, and handle the perspective distortion caused by an extreme low-angle ultra-wide lens.
This kind of request is a litmus test because it simultaneously pressures several boundaries where generation models most often fail:
- Multi-subject identity consistency: both characters must remain recognizable without contaminating each other’s features.
- Spatial relationships and occlusion: who is above, who is below, and how limbs overlap must hold up strictly.
- Structural correctness under extreme perspective: ultra-wide lenses exaggerate near objects, and hands, feet, and faces break down easily.
- Anatomical correctness of high-frequency details such as fingers, teeth, and strands of hair.
- Readability of in-image text and poster layout.
- Coherence of mixed styles: photorealistic rendering, ink wash, and bold graphic lettering must be layered rather than smeared together.
Therefore, evaluating a text-to-image model cannot rely only on whether a single image “looks good.” It must examine instruction-following rate and the distribution of failure modes under strong constraints.
2. A Reusable Five-Dimension Evaluation Framework
Break subjective impressions into objective, scoreable dimensions to avoid conclusions like “I just think A is better” that cannot accumulate into knowledge.
Instruction Following
Count how many explicitly constrained items are actually executed, such as aspect ratio, camera height, light direction, subject placement quadrant, and whether specified elements appear. The following rate can be derived as “total constraints / constraints actually satisfied.”Structural Integrity
Focus on limb count, joint direction, occlusion relationships, and whether perspective is reasonable. Under extreme wide angles, the parts closest to the camera—hands and boots—are the most likely to fail.Fidelity
Check whether micro-textures such as skin pores, sweat beads, fabric wear, and cracks in the ground look real, and whether the result appears plastic or over-smoothed.Style Controllability
When multiple styles are mixed, check whether the layers stay distinct and whether side effects occur, such as styles swallowing each other or brushwork contaminating faces.Layout & Typography
For poster-style requests, check whether text is spelled correctly, whether hierarchy is clear, and whether it conflicts with safe margins.
The value of this framework is that when you switch models, versions, or parameters, you can run regression tests with the same scorecard instead of re-judging “by feel” every time.
3. Prompt Engineering: Turning “Wishes” into an Executable Specification
The prompt in the source material is difficult because it stuffs camera, anatomy, materials, and layout into a single block of natural language. A more robust engineering approach is structured layering, letting the model parse block by block.
[Canvas] Vertical 3:4, full bleed on all sides, production-grade poster[Camera] Ground-level position, approx. 18-20mm ultra-wide, strong upward angle, exaggerated foreground perspective[Subject A] Lower-left quadrant, facing downward, tired but not exaggerated expression, five fingers[Subject B] Upper-middle of the frame, seated and occupying the back, one leg crossing horizontally through the middle[Foreground] A palm reaching toward the camera along the bottom edge, slightly out of focus, occupying a large area[Materials] Photorealistic 3D rendering + ink-wash brushwork + bold graphic lettering[Constraints] Correct finger count; correct text spelling; no extra limbs[Negative] Deformed fingers, smeared faces, cross-style contamination, watermarks, misspellings
Three practical lessons:
- Put “non-negotiable items” in a separate block with locking terms, such as composition, aspect ratio, and finger count.
- Express camera parameters as approximate ranges rather than exact values, leaving the model reasonable room to solve.
- Write only failure modes that will genuinely occur in negative constraints; too many items interfere with each other.
4. Common Failure Modes and Root Causes
- Hand breakdown: caused by ultra-wide plus near-camera magnification; mitigate by reducing the element’s share of the frame or explicitly stating “slightly out of focus, partially out of frame.”
- Identity drift: features migrate between subjects when multiple appear at once; mitigate by binding each subject to independent, non-overlapping visual anchors.
- Text misspellings: models are unstable at rendering long text; the more robust engineering approach is to “generate a text-free base image first, then overlay text in a layout layer.”
- Style intrusion: when photorealism and ink wash carry similar weight, they contaminate each other; specify a primary/secondary ratio, for example “photorealistic-dominant, with ink wash only in the background and along brushstroke edges.”
- Safety policy blocks: descriptions involving violence or revealing clothing may be rejected; rewrite them into neutral phrasing such as “a tired posture after a competitive match” or “damaged sportswear.”
5. Engineering Implementation: From Single Images to Stable Output Capacity
The model is only one link in the chain. Building capacity requires surrounding capabilities:
- Task orchestration: bring prompt templates, parameters, and random seeds under configuration management to guarantee reproducibility.
- Batching and queues: use a message queue to smooth peaks, run inference and post-processing tasks on a container platform, and scale elastically by concurrency.
- Asset flow: store generated results and intermediate artifacts in object storage, with versioned directory management.
- Quality gates: use the five-dimension scorecard above for automated or semi-automated acceptance; automatically retry and adjust the prompt when results fall short.
- Observability: use logging services and monitoring alerts to track failure rate, latency, and retry counts, and to determine whether the issue is the prompt or capacity.
- Cost governance: tier by resolution and step count—test composition at low resolution first, then render in high definition once locked—to reduce wasted compute.
An illustrative retry strategy:
def generate_with_retry(prompt, max_retry=3):for i in range(max_retry):img = call_image_model(prompt, seed=base_seed + i)score = evaluate(img) # Five-dimension scoringif score >= threshold:return img, scoreprompt = tighten_constraints(prompt, failed_items=score.failed)return img, score
6. Selection Recommendations and Conclusion
Do not look for a “single strongest model”; match models to scenarios. For posters and commercial key visuals, prioritize layout and typography; for photorealistic portraits, prioritize fidelity; for illustration and stylized work, prioritize style controllability; for high-concurrency workloads, prioritize latency and unit cost. Turn evaluation into a fixed regression set and run it whenever the model or prompt changes, and model selection shifts from subjective debate to data-driven decisions. The general cloud capabilities offered by Baidu AI Cloud—object storage, message queue, container platform, logging service, and monitoring alerts—are sufficient to support a complete chain from prompt design to stable delivery.
