GLIGENTextBoxApplyBatchCoords
This node is technically based on the GLIGEN model, which defines the position and size of text bounding boxes by parsing coordinate strings in JSON format.
GLIGEN Text Box Apply Batch Coords
The GLIGENTextBoxApplyBatchCoords node is technically based on the GLIGEN model. It defines the position and size of text bounding boxes by parsing coordinate strings in JSON format.
GLIGENTextBoxApplyBatchCoords is a node designed for batch generation processes, enabling precise spatial control over specific text content. Its core function is to receive a series of coordinate points and bind specified text prompts to specific areas on the image generation canvas, thereby achieving text-based spatial composition guidance. This node is specifically designed for workflows that require element positions to change over time or across batches.
Node Functionality
This node is technically based on the GLIGEN model. It defines the position and size of text bounding boxes by parsing coordinate strings in JSON format. It receives input from the latent space to determine the batch size and encodes spatial constraint information along with text prompts into the conditioning data, ultimately outputting a conditioning data stream fused with positional information. Its coordinate input format is designed to be directly compatible with the Spline Editor node, facilitating complex motion trajectory planning.
Node Parameter Description - GLIGENTextBoxApplyBatchCoords
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
conditioning_to | CONDITIONING | Yes | - | - | Receives existing conditioning data. This node appends new spatial text constraint information to it. |
latents | LATENT | Yes | - | - | Provides latent space representation, primarily used to determine the batch size for the generation process. |
clip | CLIP | Yes | - | - | Provides the text encoder for encoding the input text prompts. Should use the same CLIP model as the main prompt. |
gligen_textbox_model | GLIGEN | Yes | - | - | Connects the loaded GLIGEN model, which is responsible for handling the logic of spatial constraints. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
coordinates | STRING | Yes | - | - | Receives a JSON-formatted coordinate string defining the bounding box positions, typically from the Spline Editor node. |
text | STRING | Yes | - | - | Inputs the text description portion that needs to have spatial position constraints applied. |
width | INT | Yes | 128 | 8 - 4096 (Step: 8) | Sets the width of the GLIGEN text bounding box. Valid range is 8 to 4096, with an adjustment step of 8. |
height | INT | Yes | 128 | 8 - 4096 (Step: 8) | Sets the height of the GLIGEN text bounding box. Valid range is 8 to 4096, with an adjustment step of 8. |
size_multiplier | FLOAT | No | [1.0] | 1.0 | - |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| conditioning | CONDITIONING | Outputs the final conditioning data with spatial constraint information appended. |
| coord_preview | IMAGE | Outputs a visualization image for previewing the coordinates and bounding box positions. |
Usage Scenarios
This node is primarily used in animation generation workflows combined with AnimateDiff-Evolved. For example, a user can first use the Spline Editor node to draw the flight path of an object (such as "a butterfly") across multiple keyframes. Then, the generated coordinate sequence and corresponding text prompt can be input into this node to precisely control the butterfly's movement trajectory and position of appearance in the generated video sequence.
Notes
Please note that this node requires a dedicated GLIGEN model file to function, which must be downloaded separately. The input coordinate string must be in valid JSON format, and the defined bounding box positions should not exceed the canvas boundaries, otherwise it may lead to unpredictable generation results.
GLIGENTextBoxApplyBatchCoords Node Source Code Link
The GLIGENTextBoxApplyBatchCoords node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.