ComfyUI  >  Nodes  >  KJNodes for ComfyUI >  GLIGENTextBoxApplyBatchCoords

ComfyUI Node: GLIGENTextBoxApplyBatchCoords

Class Name

GLIGENTextBoxApplyBatchCoords

Category
KJNodes/experimental
Author
kijai (Account age: 2192 days)
Extension
KJNodes for ComfyUI
Latest Updated
6/25/2024
Github Stars
0.3K

How to Install KJNodes for ComfyUI

Install this extension via the ComfyUI Manager by searching for  KJNodes for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter KJNodes for ComfyUI in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

GLIGENTextBoxApplyBatchCoords Description

Facilitates batch scheduling of text box positions for GLIGEN within AnimateDiff-Evolved framework.

GLIGENTextBoxApplyBatchCoords:

GLIGENTextBoxApplyBatchCoords is a node designed to facilitate the scheduling of GLIGEN text box positions within a batch, specifically for use with the AnimateDiff-Evolved framework. This node is intended to work in conjunction with the Spline Editor node, allowing you to define and apply text box coordinates in a batch processing manner. By leveraging this node, you can efficiently manage and apply text box positions across multiple latents, ensuring consistency and precision in your AI-generated art. The GLIGEN model required for this node can be easily downloaded through the Manage's "Install Models" menu or directly from the provided link. This node simplifies the process of setting text box positions, making it accessible even for those without a deep technical background.

GLIGENTextBoxApplyBatchCoords Input Parameters:

latents

The latents input is used to calculate the batch size. It represents the latent variables that are processed in the batch, and the size of this input determines how many text box positions need to be applied. This parameter is crucial for ensuring that the number of coordinates matches the number of latents being processed.

clip

The clip parameter is your standard text encoder, which should be the same as the one used for the main prompt. This encoder processes the text input and generates the necessary embeddings for positioning the text boxes. It ensures that the text is encoded consistently with the rest of your project.

gligen_textbox_model

The gligen_textbox_model connects to the GLIGEN Loader. This model is responsible for applying the text box positions based on the coordinates and other parameters provided. It is essential for integrating the GLIGEN functionality into your workflow.

coordinates

The coordinates parameter takes a JSON string of points, which is directly compatible with the spline editor node. These coordinates define the positions where the text boxes will be placed. The JSON string should be formatted correctly to ensure accurate positioning.

text

The text parameter is the part of the prompt for which you want to set the position. This text will be encoded and positioned according to the coordinates and other parameters provided. It allows you to specify the exact text content that will be placed in the text boxes.

width

The width parameter defines the width of the GLIGEN bounding box. This value determines how wide the text box will be, affecting the layout and appearance of the text within the box.

height

The height parameter defines the height of the GLIGEN bounding box. Similar to the width parameter, this value determines the height of the text box, influencing the overall layout and appearance of the text.

GLIGENTextBoxApplyBatchCoords Output Parameters:

conditioning

The conditioning output is used between the clip text encode and the sampler. It represents the conditioned embeddings that have been adjusted based on the text box positions. This output is essential for ensuring that the text boxes are correctly positioned in the final output.

coord_preview

The coord_preview output is an optional preview of the coordinates and bounding boxes. This preview allows you to visualize the positions and sizes of the text boxes before finalizing the output, helping you make any necessary adjustments.

GLIGENTextBoxApplyBatchCoords Usage Tips:

  • Ensure that the JSON string for the coordinates parameter is correctly formatted to avoid errors in positioning.
  • Use the coord_preview output to visualize and verify the text box positions before finalizing your project.
  • Make sure the clip encoder is consistent with the one used for the main prompt to maintain coherence in text encoding.

GLIGENTextBoxApplyBatchCoords Common Errors and Solutions:

GLIGENTextBoxApplyBatchCoords WARNING: The number of coordinates does not match the number of latents

  • Explanation: This warning indicates that the number of coordinates provided does not match the number of latents being processed.
  • Solution: Ensure that the JSON string for the coordinates parameter contains the correct number of points corresponding to the batch size of the latents.

Invalid JSON format for coordinates

  • Explanation: This error occurs when the JSON string provided for the coordinates parameter is not correctly formatted.
  • Solution: Double-check the JSON string to ensure it is properly formatted, with correct use of quotes and brackets.

Mismatch in size_multiplier length

  • Explanation: This error occurs when the length of the size_multiplier array does not match the batch size.
  • Solution: Adjust the size_multiplier array to ensure it matches the batch size, either by repeating values or trimming the array as necessary.

GLIGENTextBoxApplyBatchCoords Related Nodes

Go back to the extension to check out more related nodes.
KJNodes for ComfyUI
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.