TECHNOLOGY

GLIGEN grounding inputs: keep phrase-box associations attached to the generated canvas

In this article
THE QUICK TAKE

GLIGEN boxes are generation conditions paired with phrases; they are neither detected output boxes nor a guarantee of exact pixel placement.

Understand gated grounding

The GLIGEN paper adds trainable grounding layers while retaining the pretrained generator’s frozen knowledge. Grounding information enters through a gated mechanism. This differs from detecting objects in an existing image: the boxes are supplied as conditions for synthesis. It also differs from placing a finished object cutout onto a canvas. The model still generates content, so layout adherence and object appearance require evaluation rather than being established by the existence of a box.

Preserve phrase-box correspondence

The pipeline documentation pairs each phrase with its corresponding box. Its box convention is xmin, ymin, xmax, ymax, with values normalized between 0 and 1. Keep the phrase and geometry in one logical record. Sorting phrases alphabetically while leaving boxes in their original order can produce a valid-shaped request with the wrong object assigned to each region. Input validation must check correspondence as well as length and numerical range.

Transform against the actual canvas

Imagine a layout editor that displays a resized or cropped preview. A box drawn there needs transformation into the coordinate frame of the generated canvas. Normalize against that canvas after accounting for crop and resize, not merely the original upload dimensions. Check that the minimum coordinates precede the maximum coordinates and that the intended region remains in bounds. A normalized box can still describe the wrong location if the application used an unrelated frame of reference.

Keep grounding configuration distinct

The official implementation provides the model’s grounding context. The library also exposes a scheduled-sampling factor that changes how grounding participates during inference. Record this configuration alongside the boxes and checkpoint; it is not an object-detection confidence threshold. If using the image-conditioned editing variant, identify that variant separately from blank-canvas generation. A shared list of phrases and regions does not establish identical preprocessing or preservation behavior across those tasks.

Inspect the generated layout

Compare object identity, approximate region placement, overlap, and composition separately. Retain the intended layout and actual generated image so an attractive scene cannot hide a swapped association. Existing guides on image-coordinate transformations and instance identity joins provide background. GLIGEN’s distinctive contract combines learned gated grounding with ordered phrase-region associations; neither syntactic validity nor normalized coordinates alone prove that the intended objects occupied the intended parts of the canvas.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles