MOSS-Image layout coordinates: convert a design box correctly

MOSS-Image layout control requires the coordinate system expected by the input interface, not merely a plausible-looking JSON box. The official model-facing format uses centered absolute pixel coordinates in yxyx order. A top-left design box must be translated and reordered before use in that format.

The layout-control selection guide explains why structured composition is worth testing. This walkthrough answers a more specific implementation question: how can a design team avoid sending the right box in the wrong coordinate system?

Identify the two formats

The official MOSS-Image user guide distinguishes an editable layout draft from the model prompt. Its layout section is labeled experimental; structured input does not guarantee exact output placement.

Field Editable draft Model-facing layout
Origin Top-left corner Canvas center
Coordinate space abs abs_centralized
Box order xyxy yxyx
Canvas dimensions Draft includes width and height Generation settings supply dimensions

Select the documented interface first. Feeding draft coordinates directly into the model-facing format changes both their meaning and their order.

Convert one box by hand

For a canvas with width W and height H, take a top-left-origin box [x1, y1, x2, y2]. Subtract W/2 from each x coordinate and H/2 from each y coordinate, then order the result as:

[y1 - H/2, x1 - W/2, y2 - H/2, x2 - W/2]

As an original arithmetic example, a 1024 ร— 768 canvas and box [128, 96, 896, 224] produce [-288, -384, -160, 384]. The input box is 768 pixels wide and 128 pixels high; the converted differences preserve those dimensions. This is a coordinate calculation, not an observed generated layout.

Positive x runs rightward and positive y downward in the documented centered format. Before generation, check that the box has positive width and height and falls within the intended canvas. Reject a reversed edge rather than trying to diagnose its visual output.

Keep the canvas and prompt synchronized

The user guide documents a compiler for editable drafts. Preserve both the source draft and compiled prompt. Use the same width and height in generation settings that were used when authoring the draft.

Changing canvas dimensions alone does not rescale every box. For a deliberate resize, update the draft coordinates and compile again. If changing aspect ratio requires a new composition, reposition the elements rather than assuming proportional scaling preserves the design.

After input validation, inspect placement, clipping, hierarchy and literal text separately. A correctly translated box demonstrates valid input arithmetic; it does not demonstrate that the image model obeyed it. Save unsuccessful outputs alongside successful ones when comparing adherence.

When this makes MOSS-Image useful

Choose MOSS-Image for a trial when your team can express composition as explicit regions and benefit from a documented conversion path. Exact editable typography or rigid final coordinates still call for a controlled assembly stage if generated output misses the brief.

For bilingual copy within those boxes, the mixed-script text acceptance guide supplies a separate approval procedure. Documentation and calculations reviewed November 11, 2026. No generation run or layout-accuracy measurement is claimed.

If the design changes shape, use the aspect-ratio adaptation guide to choose between scaling, cropping and recomposition before converting coordinates.