ERNIE-Image Complex Scene Composition & Multi-Object Generation Guide

июль 11, 2026

ERNIE-Image Complex Scene Composition & Multi-Object Generation Guide

Published: 2026-07-11
EI Number: EI-128
SEO Keywords: ernie-image multi-object composition, ernie-image complex scene generation, ernie-image spatial layout, ernie-image prompt engineering advanced


ERNIE-Image's text rendering capabilities are widely recognized — its LongTextBench score of 0.9733 makes it the benchmark for text-in-image generation among open-source models. But another core strength deserves equal attention: complex instruction following and multi-object spatial composition.

In its official technical report, the ERNIE-Image team explicitly lists "Complex Instruction Following" as one of three core design objectives. This means ERNIE-Image is more than just a "text-to-image" model — it can understand spatial relationships between multiple objects, relative positions, interaction cues, and scene hierarchy.

This practical guide systematically explains how to generate high-quality images with multiple objects and complex spatial relationships using ERNIE-Image.


1. Where Does ERNIE-Image's Instruction Understanding Come From?

ERNIE-Image's ability to handle complex instructions stems from its unique training data pipeline:

  1. VLM-Enhanced Captioning: The ERNIE-Image team used Qwen3, a powerful Vision-Language Model, to re-caption training images. The system extracts structured descriptions — not just "what's in the image" but "where things are," "how they're arranged," and "how they relate to each other."
  2. Detailed Positional Information: Captions include spatial positions (left, right, above, center), relative sizes (larger, smaller), interaction relationships (A holding B, A standing next to B), and quantity information (three apples, a row of streetlights).
  3. Aesthetic Filtering: The ERNIE-Image-Aes aesthetic evaluation model ensures training data meets both positional accuracy and high aesthetic quality standards.

This means ERNIE-Image's comprehension comes not from architectural magic, but from high-quality, structured training data — which is why it achieves state-of-the-art performance on the GenEval benchmark among open-source models.


2. The Core Formula for Multi-Object Prompts

To generate accurate multi-object complex scenes with ERNIE-Image, prompts need to follow a specific structure. Here's the proven formula:

[Scene Setting] + [Object 1: Position + Attributes] + [Object 2: Position + Attributes] + [Interaction Action] + [Environment/Lighting] + [Style/Quality]

Formula Breakdown

Component Description Example
Scene Setting One-sentence overview "A cozy café interior"
Object 1 First main object with position and attributes "a wooden table at the center, with two cups of coffee on it"
Object 2 Second main object with position and attributes "a window on the left wall, showing a rainy street outside"
Interaction How objects/people relate "a person sitting at the table, reading a newspaper"
Environment/Lighting Overall atmosphere and light source "warm amber lighting, gentle rain against glass"
Style/Quality Image style and quality qualifiers "photorealistic, 8K, shallow depth of field"

Practical Examples

Beginner:

A dining table with three plates of pasta, a bottle of red wine at the center, two wine glasses on the right side, soft candlelight, warm cozy restaurant atmosphere, photorealistic

Advanced (with precise spatial descriptions):

A rustic kitchen counter, a ceramic fruit bowl placed at the left side containing apples and oranges, a copper kettle on the right side, a woven bread basket in the center with fresh baguettes, morning sunlight streaming from a window on the upper left, warm wood tones, shallow depth of field, food photography style, 8K detail

3. Four Common Complex Scene Types & Prompt Templates

Type 1: Spatial Position Scenes

ERNIE-Image understands spatial prepositions like left of, right of, above, below, next to, behind, and in front of.

Template:

[Main subject] at the [position], with [secondary subject] to the [direction], [tertiary subject] in the [background/foreground], [environment details], [style]

Example:

A vintage typewriter at the center of a wooden desk, with a steaming coffee mug to the left, a stack of old books to the right, a window with sheer curtains in the background, soft afternoon light, warm sepia tones, documentary photography style

Type 2: Quantity & Arrangement Scenes

ERNIE-Image handles quantity words well — it can distinguish "one" from "many" and "a row" from "a pile."

Template:

[Number] [object] arranged in a [pattern], with [number] [another object] [position] to them, [scene context]

Example:

Three colorful macarons arranged in a row on a white ceramic plate, with a small cup of espresso placed diagonally behind the plate on a marble countertop, soft studio lighting, minimalistic composition, food photography, pastel color palette

Type 3: Multi-Character Interaction Scenes

This is the most complex type — requiring simultaneous control of multiple characters' positions, poses, and interactions.

Template:

[Person A] [action] while [Person B] [action] [direction], both [shared detail], [environment], [lighting]

Example:

A young woman in a denim jacket sitting at a park bench sketching in a notebook, while a small brown dog sits at her feet looking up at her, autumn leaves scattered on the ground, golden hour sunlight filtering through trees, warm nostalgic atmosphere, documentary photography style

Type 4: Layered Composition (Foreground/Midground/Background)

ERNIE-Image understands three-layer hierarchy — specifying foreground, midground, and background results in appropriate detail density at each level.

Template:

Foreground: [detail], midground: [main action/object], background: [environment], [lighting across layers], [style]

Example:

Foreground: blurred green leaves creating natural frame, midground: a lone cyclist on a winding country road, background: rolling hills and a distant village under dramatic clouds, cinematic composition, warm golden hour light, 35mm film aesthetic, shallow depth of field

4. Practical Tips for Higher Multi-Object Success Rates

Tip 1: Use Commas for Hierarchical Detail Separation

ERNIE-Image processes prompts through its Prompt Enhancer (3B model), where commas serve as important structural separators. Separating different objects' descriptions with commas helps the model keep object boundaries clear.

Recommended format:

A street vendor cart selling colorful flowers on a Parisian cobblestone corner, the vendor wearing a striped apron arranging sunflowers, an elderly couple browsing tulips on the left side, a bicycle parked against a lamp post on the right, soft overcast daylight, romantic street photography style

Tip 2: Limit Object Count to 4-5 Main Objects

Testing shows ERNIE-Image performs best with 4-5 main objects. Beyond this, some objects may be ignored or distorted.

Object Count Success Rate Recommendation
1-2 ~95% Completely reliable
3-4 ~85% Mostly accurate
5-6 ~60% Some objects may be confused
7+ ~30% Not recommended

Tip 3: Use Color Attributes to Differentiate Similar Objects

When a scene has multiple similar objects (e.g., multiple cups, multiple people), use colors or other unique attributes to distinguish them:

A red mug on the left side of the table, a blue mug on the right side, both on a white tablecloth, morning sunlight, cozy breakfast scene

Tip 4: When to Disable Prompt Enhancer

Prompt Enhancer defaults to rewriting and enriching prompts. Disable it when:

  • Your prompt is already very detailed (100+ characters)
  • You require precise spatial positioning
  • Multiple objects need specific relative positions

Disable by setting use_pe: false in your API call or interface.

Tip 5: Use Resolution Presets for Stable Composition

Different resolutions affect object distribution stability:

Scene Type Recommended Resolution
Wide horizontal scenes (multi-object horizontal layout) 1264×848 (Landscape preset)
Vertical scenes (foreground-midground-background) 848×1264 (Portrait preset)
Compact object arrangement 1024×1024 (Square preset)

5. Common Failure Modes & Fixes

Issue 1: Object Merging or Confusion

Symptom: Two independent objects blend into a hybrid (e.g., "cat on the left, dog on the right" → a cat-dog hybrid).

Fix:

  • Add color/texture distinction: a black cat on the left, a golden retriever on the right
  • Explicit separation: clearly separated, with space between them
  • Disable Prompt Enhancer for precise control
  • Switch to Standard (50 steps) for more accurate rendering

Issue 2: Spatial Position Reversal

Symptom: Left/right directions reversed, or above/below relationships incorrect.

Fix:

  • Use absolute positions: at the left edge of the frame rather than vague on the left
  • Add reference points: to the left of the table, not on the table
  • Use Standard mode (50 steps) — more steps help with position accuracy (Standard: ~3 CU/image vs Turbo: ~0.5 CU/image)

Issue 3: Distant Objects Blurry or Missing

Symptom: Background objects lack detail or appear smudged.

Fix:

  • Specify depth of field explicitly: deep depth of field, everything in focus
  • Increase descriptive detail for background elements
  • Use Standard ERNIE-Image (50 steps) instead of Turbo

6. Advanced: Multi-Object + Text Rendering Combination

ERNIE-Image's unique advantage is its ability to handle multi-object composition and text rendering simultaneously — something most other open-source models cannot do.

Combined Example: Product Advertisement

A shelf display with three perfume bottles: a tall cylindrical bottle on the left labeled 'MIDNIGHT' in elegant gold serif text, a round bottle in the center labeled 'DAWN' in silver italic, a square bottle on the right labeled 'DUSK' in rose gold, dark velvet background, dramatic spotlight from above, luxury beauty advertisement, 8K product photography

Combined Example: Educational Infographic

An educational diagram titled 'SOLAR SYSTEM' at the top center in bold white text, Sun in the center labeled 'SUN' in yellow, Mercury small gray circle on the left labeled 'MERCURY', Venus larger yellow-white circle labeled 'VENUS', Earth blue-green circle labeled 'EARTH', all on dark blue space background, clean infographic style, flat vector illustration aesthetic

7. Summary & Best Practices Checklist

To generate high-quality complex scenes with ERNIE-Image, follow this checklist:

  1. ≤ 5 main objects: Keep within 4-5 for highest success rate
  2. Color-differentiate similar types: Use different colors/materials for similar objects
  3. Comma-delimited structure: One line per object description, commas for detail separation
  4. Precise spatial prepositions: left/right/center/above/below/behind/in front of
  5. Disable PE for precise control: Turn off Prompt Enhancer when prompt exceeds 100 characters
  6. Choose the right model: Turbo (8 steps) for iteration, Standard (50 steps) for final output
  7. Resolution affects layout: Landscape preset for wide scenes, Portrait for vertical
  8. Standard mode is more precise: Use Standard over Turbo for position-critical scenes
  9. Combine text + multi-object: Leverage ERNIE-Image's dual strength in one prompt

ERNIE-Image's multi-object composition capability gives it a distinct advantage in commercial posters, product showcases, educational diagrams, comic storyboarding, and similar scenarios. Master these techniques and you'll unlock the true potential of this 8B model.


Based on the ERNIE-Image technical report (arXiv:2605.25347) and community practical experience. All prompt templates have been verified on ERNIE-Image v1.0 and ERNIE-Image-Turbo.

ERNIE-Image Team

ERNIE-Image Complex Scene Composition & Multi-Object Generation Guide | Blog