How the Atomic Schema Splits Subjects, Lighting, Materials, and Layout in Awesome-GPT-Image-2

The atomic schema decomposes image prompts into five independent sub-schemas—Subjects, Lighting, Materials, Layout, and Visual Details—allowing creators to modularize, reuse, and precisely control every visual component via structured JSON templates.

The awesome-gpt-image-2 repository introduces an atomic schema that transforms unstructured text prompts into hierarchical, code-like specifications. According to the source code, this architecture isolates distinct visual properties into separate JSON objects, enabling programmatic manipulation of individual image aspects without affecting the whole composition. By standardizing how subjects, lighting, materials, and layout are defined, the system creates a prompt-as-code workflow that supports rapid iteration and consistent rendering across the style library.

The Five Sub-Schemas of the Atomic Model

The atomic schema, introduced in README.md at line 79, structures every visual prompt into five discrete components. Each sub-schema controls a specific domain of the final image and accepts structured parameters that generation agents parse independently.

Subjects

The Subjects sub-schema defines the primary objects, characters, or concepts that occupy the visual field. Rather than describing the entire scene in prose, this component isolates the main entity—such as a product, character, or icon—and specifies attributes like pose, orientation, and descriptive metadata. This separation allows agents to substitute subjects while preserving environmental context.

Lighting

The Lighting sub-schema governs illumination quality, direction, color temperature, and special effects. Parameters include light source types (e.g., softbox, global illumination), directional vectors (e.g., front-left), and color values (e.g., warm, cool, neutral). By decoupling lighting from subject matter, the schema enables consistent mood application across different objects or scenes.

Materials

The Materials sub-schema specifies surface properties for every visible element, including texture, finish, reflectivity, and translucency. This component maps material descriptors to specific subjects—such as bus: "matte black with metallic accents" or virus: "high-detail 3D render with translucent envelope"—ensuring that tactile qualities remain independent of lighting conditions or spatial positioning.

Layout

The Layout sub-schema controls spatial composition, aspect ratio, framing hierarchies, and structural guides. It defines parameters like aspect: "1:1" or aspect: "9:16", compositional strategies (e.g., centered hero with side-info panels), and geometric constraints (e.g., 6–8 circular frames). This separation prevents layout changes from contaminating subject or material definitions.

Visual Details

The Visual Details sub-schema captures fine-grained aesthetic cues including color palettes, mood descriptors, background ambience, and decorative accents. Fields such as palette: "deep navy, electric green" or mood: "premium tech" provide the stylistic glue that unifies subjects, lighting, and materials into a cohesive visual statement.

Practical Benefits of the Atomic Schema

Decomposing prompts into these five sub-schemas delivers three core capabilities that are implemented throughout the repository's template system in docs/templates.md and the shared style library in data/style-library.json:

  • Reuse: Swapping a subject—such as replacing "electric bus" with "electric bike"—automatically generates a new prompt while preserving the original lighting, materials, and layout specifications.

  • Parameterization: Each sub-schema exposes distinct arguments for agents and scripts using bracketed parameter syntax (e.g., [argument name="lighting"]), enabling API-driven prompt construction.

  • Constraint Enforcement: Developers can apply validation rules to individual sections, such as prohibiting generic magnifying-glass icons specifically within the layout component, ensuring generated images maintain brand consistency.

JSON Implementation Examples

The following examples from the repository demonstrate how the atomic schema splits subjects, lighting, materials, and layout into discrete JSON objects that generation engines concatenate into final prompts.

Example 1: Scientific Infographic

{
  "type": "Infographic",
  "subject": {
    "description": "Coronavirus virus"
  },
  "lighting": {
    "type": "global illumination",
    "color": "neutral"
  },
  "materials": {
    "virus": "high-detail 3D render with translucent envelope"
  },
  "layout": {
    "aspect": "9:16",
    "structure": "6–8 circular frames, zoom-path lines"
  },
  "details": {
    "palette": "medical red, blue, beige",
    "style": "scientific editorial"
  }
}

Example 2: E-Commerce Product Hero

{
  "type": "E-commerce Hero Image",
  "subject": {
    "description": "Electric city bus",
    "pose": "dramatic three-quarter view"
  },
  "lighting": {
    "type": "studio softbox",
    "direction": "front-right",
    "color": "cool"
  },
  "materials": {
    "bus": "matte black with metallic accents",
    "windows": "glossy glass with subtle reflections"
  },
  "layout": {
    "aspect": "1:1",
    "composition": "centered hero, side-info panels"
  },
  "details": {
    "palette": "deep navy, electric green, steel gray",
    "background": "premium smart-city skyline"
  }
}

Key Source Files and Implementation

The atomic schema is defined, documented, and consumed across three critical files in the freestylefly/awesome-gpt-image-2 repository:

  • README.md (line 79): Introduces the conceptual framework for the atomic split and explains the high-level purpose of decomposing prompts into modular sub-schemas.

  • docs/templates.md: Contains the concrete JSON and markdown templates that instantiate each atomic component, serving as the reference implementation for template authors.

  • data/style-library.json: The shared style library that generation agents consume, where every entry respects the five-part atomic split, enabling consistent parameter substitution across the entire collection.

Summary

  • The atomic schema divides image prompts into five distinct sub-schemas: Subjects, Lighting, Materials, Layout, and Visual Details.
  • Each sub-schema controls a specific visual domain and accepts structured JSON parameters independent of other components.
  • This modularization enables reusability (swapping individual elements), parameterization (API-driven argument passing), and controlled constraints (domain-specific validation).
  • Implementation files include README.md for specification, docs/templates.md for template definitions, and data/style-library.json for the consumable style library.
  • The system supports "prompt-as-code" workflows where changing one sub-schema (e.g., switching from neutral to warm lighting) does not require rebuilding the entire prompt structure.

Frequently Asked Questions

What is the fifth sub-schema in the atomic model besides subjects, lighting, materials, and layout?

The fifth component is Visual Details, which captures fine-grained aesthetic properties including color palettes, mood descriptors, background ambience, and decorative accents. According to the repository's docs/templates.md, this sub-schema provides the stylistic cohesion that binds the other four components into a unified visual output.

How does the atomic schema enable prompt reusability?

By isolating subjects, lighting, materials, and layout into separate JSON objects, the schema allows you to replace any single component—such as substituting "electric bike" for "electric city bus" in the subject field—without modifying the surrounding context. As implemented in data/style-library.json, this modularity means one lighting configuration can illuminate multiple subjects, or one layout can frame different products.

Where is the atomic schema defined in the awesome-gpt-image-2 repository?

The atomic schema is introduced conceptually in README.md at line 79, which outlines the high-level decomposition strategy. The concrete JSON templates and field specifications reside in docs/templates.md, while the working implementation that generation agents consume is stored in data/style-library.json.

Can I enforce constraints on specific sub-schemas without affecting others?

Yes. The atomic architecture supports domain-specific validation rules applied to individual sub-schemas. For example, you can prohibit generic icons within the Layout component or restrict color palettes within Visual Details while leaving Subjects and Materials unconstrained. This granular control ensures generated images adhere to brand guidelines without limiting creative flexibility in other areas.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →