sum_TextEncode:
The sum_TextEncode node is designed to enhance the process of encoding text prompts into embeddings that can guide image generation models, particularly those using CLIP (Contrastive Language–Image Pretraining) models. This node allows you to input both positive and negative prompts, which are then encoded to influence the resulting image generation. By adjusting the weight of the main prompt, you can control the degree to which the overall semantic meaning of the text influences the image output. This node is particularly useful for AI artists who want to fine-tune the balance between different textual influences on their generated images, offering a flexible approach to prompt conditioning.
sum_TextEncode Input Parameters:
context
The context parameter is a required input that represents the current running context of the node. It is essential for maintaining the state and data flow within the node network, ensuring that the encoded text prompts are correctly integrated into the image generation process.
pos
The pos parameter is an optional string input that allows you to specify a positive text prompt. This prompt is encoded and used to positively influence the image generation process. The default value is an empty string, and it supports multiline input, enabling you to provide detailed and complex prompts.
neg
The neg parameter is an optional string input for specifying a negative text prompt. This prompt is encoded to negatively influence the image generation, effectively reducing the impact of certain features or styles. The default value is an empty string, and it does not support multiline input.
mode
The mode parameter allows you to select the encoding mode from a predefined list of options: "normal", "flux2.klein", "z-image", and "qwen-image". The default mode is "normal". Each mode may apply different encoding strategies or transformations, affecting how the text prompts are processed and integrated into the image generation.
main_prompt_ratio
The main_prompt_ratio parameter is a float value that determines the weight of the main prompt in the overall semantic influence on the image generation. It ranges from 0.0 to 1.0, with a default value of 0.5. A higher value increases the influence of the main prompt, while a lower value allows for more balanced or nuanced influences from other prompts.
sum_TextEncode Output Parameters:
context
The context output parameter returns the updated running context after processing the text prompts. This context includes the encoded text embeddings and is essential for subsequent nodes in the network to continue the image generation process.
positive
The positive output parameter provides the conditioning embedding derived from the positive text prompt. This embedding is used to guide the image generation model towards incorporating the desired features and styles specified in the positive prompt.
negative
The negative output parameter provides the conditioning embedding derived from the negative text prompt. This embedding helps the image generation model to avoid or minimize certain features and styles specified in the negative prompt.
sum_TextEncode Usage Tips:
- Experiment with different
modesettings to see how they affect the encoding and resulting image generation. Each mode may offer unique transformations that can enhance your creative output. - Adjust the
main_prompt_ratioto fine-tune the balance between the main prompt and other influences. A higher ratio can help emphasize the main prompt's features, while a lower ratio allows for more subtlety and complexity in the generated images.
sum_TextEncode Common Errors and Solutions:
ERROR: clip input is invalid: None
- Explanation: This error occurs when the CLIP model input is not properly initialized or is missing.
- Solution: Ensure that the CLIP model is correctly loaded and passed to the node. Check the upstream nodes to verify that the CLIP model is being provided.
Invalid prompt input
- Explanation: This error may arise if the positive or negative prompt inputs are not correctly formatted or are empty when they should contain text.
- Solution: Verify that the
posandnegparameters contain valid text strings. Ensure that the inputs are not empty if they are intended to influence the image generation.
