Layered Generation Architecture: Plan First, Then Generate
This article explains why direct, end-to-end image generation often falls short in real design workflows, and how a two-stage "plan then generate" architecture addresses the gap. It covers the division of labor between the planning stage, which produces a structured and verifiable intermediate representation, and the rendering stage, which handles visual quality under fixed structural constraints. Key design points include explicit and computable constraints, a feedback loop between planning and rendering, and business-oriented evaluation metrics. The article also outlines practical team and engineering considerations for moving from demos to design productivity.
1. Why Direct Generation Falls Short in Design Workflows
Image generation models have improved significantly in visual richness and realism. However, in real design production environments, users rarely ask for “a nice-looking image.” They ask for “an image that matches specifications and can still be edited.” There is a clear gap between these two types of demands.
The pain points fall into three areas:
- Uncontrollable count and structure: When a design requires a specific number of objects or a chart with a defined hierarchy, purely generative methods tend to drift in count and produce broken structures.
- Unreliable text and layout: Titles, labels, and captions in a design must be semantically correct and precisely positioned. End-to-end generation often produces malformed glyphs, occlusion, and misalignment.
- Results that cannot be edited afterward: If the output is a single, non-separable bitmap, users cannot move elements, replace copy, or adjust hierarchy, which makes design rework expensive.
As a result, the industry is shifting from “one-step generation” to “staged generation”: breaking a design task into verifiable intermediate representations, then using a renderer to produce the final output.
2. Core Idea: Division of Labor and Handoff in a Two-Stage Architecture
The essence of “plan first, then generate” is decoupling semantic decisions from pixel rendering.
2.1 The Planning Stage: What, Where, and How to Arrange
The planning stage does not output an image. It outputs a structured description that typically includes:
- An element inventory with categories and counts;
- The position, size, and hierarchy of each element;
- Text content, font style constraints, and alignment;
- A global layout template or grid constraints.
A schematic intermediate representation can be abstracted as:
{"canvas": {"width": 1920, "height": 1080},"elements": [{"id": "e1", "type": "text", "content": "Title", "bbox": [120, 80, 800, 160]},{"id": "e2", "type": "chart", "series": 3, "bbox": [120, 300, 1200, 600]},{"id": "e3", "type": "image", "prompt": "natural landscape", "bbox": [1360, 80, 480, 600]}],"constraints": {"min_gap": 24, "align": "left"}}
The value of this representation is that it is verifiable: whether the count is correct, whether bounds are exceeded, and whether spacing requirements are met can all be checked with rules or code before rendering.
2.2 The Generation Stage: Whether It Looks Good and Realistic
The rendering stage receives the plan and completes texture, lighting, style, and detail synthesis. Because the structure is already fixed, the generation model only works under local constraints, which significantly reduces both the error rate and the scope of rework.
2.3 After Generation: Layering and Editability
After generation, the system should preserve layer semantics so users can continue to edit text, move elements, and replace assets. Whether editable layers are supported is the dividing line between a demo and a productivity tool.
3. Key Design Points
3.1 Constraints Must Be Explicit and Computable
Avoid relying on vague natural language as the only source of constraints. A combination of “structured fields plus validation functions” is recommended:
def validate(plan):assert plan["elements"][1]["series"] == 3, "Unexpected number of chart series"for e in plan["elements"]:x1, y1, x2, y2 = e["bbox"]assert 0 <= x1 < x2 <= plan["canvas"]["width"]assert 0 <= y1 < y2 <= plan["canvas"]["height"]return True
3.2 A Feedback Loop Between Planning and Rendering
If text overflows or elements overlap after rendering, the system should fall back to the planning layer and adjust layout parameters, rather than asking the generation model to “try again.” The closed-loop flow can be described as: plan → validate → render → detect → revise the plan.
3.3 Business-Oriented Evaluation Metrics
- Structural accuracy: whether count, category, and hierarchy are correct;
- Layout compliance rate: the proportion of out-of-bounds, overlap, and spacing violations;
- Text accuracy: whether characters and semantics are correct;
- Human preference and overall leaderboard ranking;
- Edit success rate: whether users can complete secondary modifications smoothly.
4. Implementation Advice and Team Collaboration
For this type of capability to have real impact, research and product must be tightly coupled: requirements come from real usage scenarios, feedback comes from real user behavior, and the iteration cadence targets shipping a usable version as quickly as possible. In terms of team composition, it is advisable to cover four directions at the same time: planning algorithms, generation and rendering, front-end editing interaction, and the evaluation system, so that research output does not stay at offline metrics.
On the engineering side, general cloud capabilities can handle the load, for example using a container platform to host inference services, object storage to manage assets and outputs, message queues to smooth traffic peaks, and logging and monitoring with alerting to track quality and stability.
5. Conclusion
“Plan first, then generate” does not deny the value of generation models. It gives them a verifiable skeleton. When controllable structure, editable results, and measurable quality hold at the same time, generative technology truly turns from a demo effect into design productivity.
