# Anti-Pitfall Guides for Awesome-GPT-Image-2 Templates: Avoiding Common AI Image Generation Mistakes

> Master Awesome-GPT-Image-2 templates with anti-pitfall guides. Avoid common AI image generation mistakes like hallucinations and text errors. Generate better images.

- Repository: [苍何/awesome-gpt-image-2](https://github.com/freestylefly/awesome-gpt-image-2)
- Tags: best-practices
- Published: 2026-09-08

---

**Awesome-GPT-Image-2 templates include domain-specific "avoid-pitfall guides" (避坑指南) that enforce explicit constraints, negative directives, and sequence hints to eliminate hallucinations, unreadable text, and style mismatches in AI-generated images.**

The `freestylefly/awesome-gpt-image-2` repository provides more than 20 industrial-grade prompt templates spanning UI design, infographics, photography, and character art. Each template embeds an anti-pitfall guide that instructs the model exactly what to lock, enforce, or exclude. These guides follow a strict three-part architecture: **explicit constraints** (concrete attributes like aspect ratio), **negative directives** (banned elements like "no gibberish text"), and **sequence hints** (order of operations such as locking layout before style).

## What Are Anti-Pitfall Guides in Awesome-GPT-Image-2?

Anti-pitfall guides are structured rule sets embedded in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) that accompany every visual domain template. According to the source code in [`shared/apimart.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/shared/apimart.js), the system parses these markdown guides and concatenates them with base prompts before sending requests to the image generation API.

The guides serve three critical functions:

1. **Explicit Constraints** – Require concrete, measurable attributes (platform, aspect ratio, color hex codes, layout grid).
2. **Negative Directives** – Hard prohibitions such as "no modern elements" or "don't fill the canvas with paragraphs."
3. **Sequence Hints** – Mandatory ordering advice (e.g., "lock the UI layout first, then specify visual style").

## Domain-Specific Anti-Pitfall Strategies

### UI & Screenshots

The UI template in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) demands precise platform specification to avoid generic interfaces.

- Always specify **platform** (iOS, Android, Web), **aspect ratio**, and **layout** type.
- Force **text readability** and lock exact Chinese characters to prevent garbled output.
- Distinguish platform-specific cues (e.g., Twitter's blue-check vs. Douyin's music disc icon).

### Infographics

The infographic guide controls information density to prevent cluttered, unreadable visuals.

- Limit **module count** and explicitly declare **chart type** (flowchart, bar graph, pie chart).
- Keep copy short; prohibit paragraph overload on the canvas.
- Enforce clear visual hierarchy through size and color constraints.

### Posters & Layouts

Poster templates enforce typographic dominance and prohibit lazy design patterns.

- The **title must be 100% correct** and occupy the top of the visual hierarchy.
- Ban moodboards, multi-poster grids, and generic 3D lettering.
- Require specific alignment and margin rules before generating content.

### Product & E-Commerce

Product photography templates emphasize material realism to avoid "stall-goods" aesthetics.

- Emphasize **material** and **lighting** specifications; without them, renders look artificial.
- Restrict promotional copy to 1-2 lines maximum.
- For beauty recommendations, require skin-tone analysis before color palette mapping.

### Brand & Identity

Brand templates start with semantic keywords rather than visual descriptions.

- Begin with **brand keywords** before requesting visual output.
- Enforce **pure white backgrounds** for easy cut-out and asset reuse.
- Provide explicit "don't-do" rules for color misuse and logo placement.

### Architecture & Space

Architectural guides lock perspective to prevent distortion.

- Lock **camera perspective** (eye-level, aerial, worm's-eye) to eliminate lens distortion.
- Use **cold-warm lighting contrast** to create premium spatial depth.
- Prohibit floating structures or physically impossible geometry.

### Photography & Realism

Photography templates add intentional imperfections to avoid plastic CGI looks.

- Add **realistic imperfections** (skin pores, film grain, dust) to prevent synthetic appearances.
- Use explicit **photographic parameters** (f-stop, focal length, ISO) instead of vague adjectives like "professional" or "high quality."

### Illustration & Art

Illustration guides require technical specificity over vague artistic references.

- Pin down **brush style**, **medium**, and **color palette** explicitly.
- Avoid generic artist names; instead describe **signature techniques** (e.g., "wet-on-wet watercolor blending" rather than "in the style of Monet").

### Character & Avatar

Character design templates require exhaustive attribute lists to prevent generic faces.

- Detail every visual attribute: age, hairstyle, clothing texture, and accessories.
- **Lock pose and emotion** explicitly.
- For action-sheet references, enforce a **fixed grid layout** and prohibit background clutter.

### Scene & Narrative

Scene templates use kinetic language to generate motion.

- Include a **verb-driven event** ("exploding," "collapsing," "dissolving") to imply motion.
- Specify **camera language** (low-angle, Dutch angle, tracking shot) to shape dramatic tension.

### Historical / Period

Historical templates enforce temporal purity.

- State the **exact dynasty or era** (e.g., "Tang Dynasty, 8th century").
- Add "no modern elements" as a hard negative constraint to prevent anachronisms.

### Document & Publication

Document templates define structure before content.

- Define **columns**, **margins**, and **hierarchy** before requesting visual elements.
- Use **placeholder text** ("Simulated text blocks") rather than full sentences to prevent distraction.

### Other Applications

General-purpose templates follow a constraint-first methodology.

- Begin with a concise **task statement** followed by constraint lists.
- Request both a **primary and alternative solution** for rapid A/B testing.

## How the Anti-Pitfall System Works

The implementation spans four key files: [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md), [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx), [`shared/apimart.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/shared/apimart.js), and [`src/apimartClient.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/apimartClient.js).

**Template Selection** – The front-end in [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx) renders a dropdown of categories. When a user selects "UI Screenshot" or "Product Photography," the component retrieves the corresponding markdown section.

**Prompt Assembly** – The [`shared/apimart.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/shared/apimart.js) library parses the markdown, extracts the "避坑指南" section, and concatenates it with the base prompt. This ensures every generation request includes the domain-specific constraints.

**JSON Mode** – For programmatic access, the system accepts structured JSON objects that encode constraints directly. The [`src/apimartClient.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/apimartClient.js) validates these objects against the anti-pitfall schema before forwarding to the `/api/generate-image` endpoint.

**Result Validation** – The client validates that required keywords (e.g., "文字绝对可读" for text readability) appear in the generated image metadata. If constraints are violated, the system retries with reinforced negative directives.

## Practical Code Examples

### UI Screenshot (JSON Mode)

```json
{
  "type": "UI Screenshot",
  "platform": "iOS",
  "product": "Fitness App",
  "layout": "Card-based feed with bottom tab bar",
  "style": {
    "theme": "Dark Mode",
    "primary_color": "Neon Green",
    "typography": "Clean sans-serif"
  },
  "content": {
    "header": "Today's Activity",
    "cards": [
      {"title": "Running", "data": "5.2 km", "button": "Start"},
      {"title": "Calories", "data": "340 kcal"}
    ]
  },
  "constraints": "High fidelity, readable text, 9:16 aspect ratio. 文字必须准确显示指定的中文，禁止乱码"
}

```

The `constraints` field directly embeds the UI anti-pitfall rule prohibiting garbled Chinese characters.

### Infographic (Plain Text Prompt)

```

生成 老年人日常健康管理指南 信息图，目标读者为 65-75 岁退休人士。
结构：标题区 + 3 个模块，每模块含图标、短标题、1-2 句说明。
图表类型：流程图。
风格：专业报告，主色 蓝色，背景 浅色。
约束：信息层级清晰、可读性高的中文信息图。
不要把大量正文塞进画面，保持模块数量固定。

```

The final two lines implement the infographic anti-pitfall directives against text overload and module proliferation.

### Product Hero Shot (Text Prompt)

```

生成 噪声消除耳机 电商主图。
场景：极简工作室，背景 灰色渐变。
灯光：软箱顶光 + 边缘背光。
材质：磨砂金属，标明 “NEW” badge。
约束：商业摄影质量，超高真实感。
不要把促销文字占满全屏，保持主体清晰。

```

The closing constraint "不要把促销文字占满全屏" originates from the product anti-pitfall guide's rule against promotional text crowding.

## Summary

- **Anti-pitfall guides** (避坑指南) in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) provide domain-specific guardrails for 20+ visual categories.
- Each guide follows a three-layer architecture: **explicit constraints**, **negative directives**, and **sequence hints**.
- The system implementation spans [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx) (UI), [`shared/apimart.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/shared/apimart.js) (parsing), and [`src/apimartClient.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/apimartClient.js) (API communication).
- **JSON Mode** allows programmatic constraint encoding, while plain-text prompts embed negative directives directly.
- Specific prohibitions include: no garbled text (UI), no paragraph overload (infographics), no modern elements (historical scenes), and no full-screen promotional text (product shots).

## Frequently Asked Questions

### How do I prevent unreadable text in AI-generated UI screenshots?

Specify the exact Chinese characters required and add the constraint "文字绝对可读" (text must be absolutely readable). According to the UI template in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md), you must explicitly lock the platform (iOS/Android), aspect ratio, and distinguish platform-specific UI cues like Twitter's blue-check marks to avoid generic interface hallucinations.

### What is the most common pitfall when generating product photography?

The product template identifies "stall-goods" aesthetics—images that look like low-quality market photos—as the primary failure mode. To avoid this, you must explicitly specify **material texture** (e.g., "brushed aluminum") and **lighting setup** (e.g., "softbox top light with rim backlight") rather than using vague terms like "professional lighting."

### Can I use these anti-pitfall guides with non-Chinese prompts?

Yes. While the repository's [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) uses Chinese terminology (避坑指南), the architectural principles apply to any language. The [`shared/apimart.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/shared/apimart.js) parser extracts constraints regardless of language, and the JSON Mode examples demonstrate how to encode these rules in English or other languages for the underlying diffusion model.

### Where does the system validate that anti-pitfall rules were followed?

The validation occurs in the client layer ([`src/apimartClient.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/apimartClient.js)) and through metadata inspection. The system checks that required keywords from the anti-pitfall guides appear in the generated image metadata. If validation fails—such as missing text readability tags for UI screenshots—the client automatically retries with reinforced negative directives to ensure compliance.