ComfyUI > Nodes > ComfyUI_API_Manager > Text Prompt Combiner Node

ComfyUI Node: Text Prompt Combiner Node

Class Name

TextPromptCombinerNode

Category
API Manager
Author
CC-BryanOttho (Account age: 808days)
Extension
ComfyUI_API_Manager
Latest Updated
2024-06-14
Github Stars
0.02K

How to Install ComfyUI_API_Manager

Install this extension via the ComfyUI Manager by searching for ComfyUI_API_Manager
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_API_Manager 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Prompt Combiner Node Description

Integrates dynamic data into text prompts for AI projects, enhancing customization and relevance.

Text Prompt Combiner Node:

The TextPromptCombinerNode is designed to seamlessly integrate dynamic data into text prompts, enhancing the flexibility and adaptability of your AI-driven projects. This node takes a text prompt template and enriches it by replacing placeholders with actual data from an API response. This allows for the creation of highly customized and contextually relevant text prompts that can be used in various applications, such as guiding AI models in generating specific outputs. By leveraging the power of the CLIP model, the node encodes the combined text into a format that can be used to influence AI models, ensuring that the generated content aligns closely with the desired outcomes. This node is particularly beneficial for users looking to automate and personalize text generation processes, making it a valuable tool in the realm of AI art and content creation.

Text Prompt Combiner Node Input Parameters:

text_prompt_template

The text_prompt_template parameter is a string that serves as the foundational structure for your text prompt. It can include placeholders, denoted by a $ prefix, which will be dynamically replaced with corresponding values from the API response. This allows for the creation of flexible and adaptable text prompts that can be tailored to specific contexts or data inputs. The template can be multiline, providing the ability to craft complex and detailed prompts. There are no explicit minimum or maximum values, but the complexity of the template should be balanced with the intended use case.

api_response

The api_response parameter is a JSON object that contains the data to be integrated into the text prompt template. This data is used to replace placeholders within the template, allowing for the creation of personalized and contextually relevant text prompts. The JSON object should be structured such that each key corresponds to a placeholder in the template, with the associated value being the data to insert. The default value is an empty JSON object, and there are no specific constraints on the size or complexity of the data, though it should be manageable within the context of the application.

id_field_name

The id_field_name parameter is a string that specifies the key in the api_response JSON object from which to extract an ID. This ID can be used for tracking or reference purposes, providing a way to associate the generated text prompt with specific data or events. The default value is an empty string, indicating that no ID extraction is required unless specified. This parameter is optional, and its use depends on whether an ID is needed for your particular application.

clip

The clip parameter refers to the CLIP model used to encode the combined text prompt. This model is essential for transforming the text into a format that can be used to guide AI models, such as those used in image generation or other creative applications. The CLIP model is a powerful tool for understanding and processing text, and its inclusion in this node ensures that the generated prompts are effectively utilized in downstream tasks. There are no specific default values or constraints, but the CLIP model should be compatible with the text encoding requirements of your application.

Text Prompt Combiner Node Output Parameters:

CONDITIONING

The CONDITIONING output is a complex data structure that contains the encoded representation of the combined text prompt. This output is crucial for guiding AI models, as it provides the necessary context and instructions for generating content that aligns with the specified prompt. The conditioning includes both the encoded text and additional metadata, such as pooled output, which can be used to fine-tune the model's response. This output is essential for applications that require precise control over the generated content, such as AI art or content creation.

ID

The ID output is a string that represents the extracted ID from the api_response, based on the id_field_name parameter. This ID serves as a reference or tracking mechanism, allowing you to associate the generated text prompt with specific data or events. It is particularly useful in applications where maintaining a link between the input data and the generated output is important, such as in automated reporting or data-driven content generation.

Text Prompt Combiner Node Usage Tips:

  • Ensure that your text_prompt_template is well-structured and includes clear placeholders for dynamic data insertion. This will maximize the flexibility and relevance of your generated prompts.
  • When using the api_response, make sure that the JSON object is correctly formatted and contains all necessary data for placeholder replacement. This will prevent errors and ensure that your prompts are accurately populated.

Text Prompt Combiner Node Common Errors and Solutions:

Placeholder not found in template

  • Explanation: This error occurs when a placeholder in the text_prompt_template does not have a corresponding key in the api_response.
  • Solution: Verify that all placeholders in your template have matching keys in the API response. Ensure that the keys are correctly spelled and formatted.

CLIP model not provided

  • Explanation: This error arises when the clip parameter is not supplied, preventing the encoding of the text prompt.
  • Solution: Ensure that a valid CLIP model is provided as input. Check that the model is compatible with your application's requirements.

Invalid JSON format in api_response

  • Explanation: This error indicates that the api_response is not a properly formatted JSON object.
  • Solution: Validate the JSON structure of your API response. Use tools or libraries to ensure it is correctly formatted and contains the necessary data.

Text Prompt Combiner Node Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_API_Manager
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.