KJNodes/experimentalgenerated

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

conditioning_to
latents
clip
gligen_textbox_model
conditioning
coord_preview
coordinates
STRING
text
STRING
width
128
height
128
size_multiplier
1
KJNodes

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 NameData TypeRequiredDefault ValueRange/OptionsDescription
conditioning_toCONDITIONINGYes--Receives existing conditioning data. This node appends new spatial text constraint information to it.
latentsLATENTYes--Provides latent space representation, primarily used to determine the batch size for the generation process.
clipCLIPYes--Provides the text encoder for encoding the input text prompts. Should use the same CLIP model as the main prompt.
gligen_textbox_modelGLIGENYes--Connects the loaded GLIGEN model, which is responsible for handling the logic of spatial constraints.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
coordinatesSTRINGYes--Receives a JSON-formatted coordinate string defining the bounding box positions, typically from the Spline Editor node.
textSTRINGYes--Inputs the text description portion that needs to have spatial position constraints applied.
widthINTYes1288 - 4096 (Step: 8)Sets the width of the GLIGEN text bounding box. Valid range is 8 to 4096, with an adjustment step of 8.
heightINTYes1288 - 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_multiplierFLOATNo[1.0]1.0-

Output

Parameter NameData TypeDescription
conditioningCONDITIONINGOutputs the final conditioning data with spatial constraint information appended.
coord_previewIMAGEOutputs 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.

The GLIGENTextBoxApplyBatchCoords node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…