Multimodal Image Generation: Technical Evolution and Practical Implementation

    This article examines why image generation models often fail under complex instructions and explains a layered architecture that separates planning from rendering. It covers structured intermediate representations, spatial relationships, attribute binding, executable negation, in-image text rendering, editable document output, a reusable production pipeline, and evaluation practices for building controllable multimodal generation systems.

    1. Background: Why Complex Instructions Have Been Unreliable

    In content production workflows, image generation models frequently produce attribute mismatches when given complex instructions: colors bound to the wrong objects, ignored spatial relationships, ineffective negation, and in-image text that turns into unreadable gibberish. The root cause is not style or aesthetics. It is that the generation paradigm does not model semantic structure well enough.

    Traditional diffusion models work by iteratively denoising random noise, using text conditions to guide the pixel distribution toward convergence. They perform well on texture, lighting, and style transfer, but they lack an explicit representation for structured constraints such as who is on the left, who is on the right, and who is not doing something. As the number of entities, attributes, and relationships in a sentence increases, the conditioning signal gets averaged out, and the model tends to generate combinations that are frequent, safe, and wrong.

    The industry has gradually reached a shared conclusion: complex scene generation requires a layered architecture that plans first and renders afterward, decoupling semantic understanding from pixel synthesis.

    2. Core Approach: A Layered Architecture That Decouples Planning and Rendering

    A widely validated engineering pattern is a two-stage pipeline combining an autoregressive planner with a diffusion renderer.

    • Planning stage: an autoregressive model with language understanding capabilities parses the instruction and outputs a structured intermediate representation, such as a scene graph, object list, attribute bindings, spatial relationships, and negation constraints.
    • Rendering stage: the diffusion model synthesizes pixels conditioned on the intermediate representation, handling composition, materials, lighting, and details.

    An illustrative intermediate representation (pseudocode, shown only to explain the data structure and not representing any specific interface):

    1. {
    2. "canvas": {"width": 1024, "height": 1024},
    3. "objects": [
    4. {"id": "girl", "attributes": {"color": "red", "clothing": "raincoat"},
    5. "relation": {"type": "at", "anchor": "bench", "side": "left"}},
    6. {"id": "dog", "attributes": {"action": "not_eating"},
    7. "relation": {"type": "at", "anchor": "bench", "side": "right"}},
    8. {"id": "bench", "attributes": {"color": "blue"}}
    9. ],
    10. "negations": ["dog.eating_apple"]
    11. }

    The direct benefit of this layering is traceable constraints. When a result is wrong, you can identify whether the failure came from parsing, binding, or rendering, instead of attributing the problem vaguely to a weak model.

    3. Key Capabilities

    3.1 Spatial Relationships and Attribute Binding

    A structured intermediate representation converts left, right, above, contains, and adjacent into explicit fields, so rendering conditions no longer depend on the model guessing. Attribute binding (color to object) also changes from a vague language prior into a definite key-value pair, significantly reducing color bleeding, incorrect accessories, and mismatched identities.

    3.2 Making Negation Executable

    Negation such as “not eating an apple” is nearly ineffective in traditional conditioning, because the condition vector expresses what should appear. The layered architecture turns negation into a constraint: either mark the state as false in the scene graph, or use it as a negative condition during rendering guidance. In engineering practice, combining both usually works better.

    3.3 Structured Decoding of In-Image Text

    Text rendering is difficult because general-purpose models treat characters as texture. A workable approach is to introduce a character-level representation: treat text as a sequence of symbols composed of strokes, components, and glyph structure, first determine the layout area and font size, then compose character by character. Practical points include:

    • Render text and graphics in separate layers, generating the text layer independently and compositing it afterward to avoid interference;
    • Limit the amount of text per image, and convert long text into a combination of image plus layout layer;
    • Build a character coverage test set and treat readability as an independent metric rather than a side effect.

    3.4 Layout Polishing and Editable Document Output

    To go from a single image to a deliverable document, what is missing is layout structure and editability. A more mature engineering practice is to first generate a layout description (title area, body area, chart area, footer), then fill in content, and finally export to an editable presentation or document format. The output is then not a flat bitmap but a structured file that can be modified again, ready to enter an enterprise content production workflow.

    4. Engineering Implementation: A Reusable Production Pipeline

    1. Instruction preprocessing: normalize the wording, extract entities, attributes, relationships, and negation items, fill missing information with default values, and record them.
    2. Intermediate representation validation: run consistency checks on the scene graph (duplicate objects, cyclic relationships, missing anchors).
    3. Rendering and retry: define failure criteria (attribute not matched, text unreadable) and trigger a limited number of retries rather than unlimited resampling.
    4. Quality evaluation: measure four dimensions separately: semantic consistency, spatial relationship accuracy, text readability rate, and aesthetic score.
    5. Storage and distribution: archive artifacts together with the intermediate representation in object storage, drive asynchronous tasks through a message queue, and track failure rate and latency with logging and monitoring.

    For cloud implementation, a container platform can host inference services, object storage can hold assets and artifacts, a message queue can decouple tasks, and a logging and monitoring system can provide observability. These are general capability categories, and specific choices should be evaluated based on scale and cost.

    5. Prompt and Evaluation Practices

    • Structure instructions: write in the order of subject, attributes, relationships, background, negation, and text to reduce ambiguity.
    • Change one variable at a time: when debugging, keep other conditions fixed and verify each binding one by one.
    • Build a regression set: turn historical failure cases into test cases and run them after every model or prompt change.
    • Metrics before optimization: polishing adjustments without quantitative metrics tend to improve locally while degrading overall.

    6. Common Pitfalls

    • Attributing failures to insufficient model capability while ignoring missing intermediate representations and validation;
    • Pursuing high information density in a single image, causing attributes to interfere with each other;
    • Focusing only on visual polishing without editable output, which still requires extensive manual rework after delivery;
    • Lacking regression evaluation, making the iteration process uncontrollable.

    7. Conclusion

    The next stage of competition in multimodal image generation will focus not on image quality at a single point, but on controllability, evaluability, and deliverability. Only by breaking semantic planning, rendering synthesis, text layout, and document export into observable and testable stages can generation capabilities be reliably embedded in real content production systems. If you want to build such a pipeline on Baidu AI Cloud, a practical starting point is general containerized inference, object storage, and an observability system, then gradually improving evaluation and regression mechanisms.