ComfyUI > Nodes > ComfyUI-Apt_Preset > sum_TextEncode

ComfyUI Node: sum_TextEncode

Class Name

sum_TextEncode

Category
Apt_Preset/chx_tool
Author
cardenluo (Account age: 1062days)
Extension
ComfyUI-Apt_Preset
Latest Updated
2026-04-04
Github Stars
0.28K

How to Install ComfyUI-Apt_Preset

Install this extension via the ComfyUI Manager by searching for ComfyUI-Apt_Preset
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Apt_Preset 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

sum_TextEncode Description

Encodes text prompts into embeddings for CLIP models, allowing prompt weight adjustments for image generation.

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 mode settings 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_ratio to 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 pos and neg parameters contain valid text strings. Ensure that the inputs are not empty if they are intended to influence the image generation.

sum_TextEncode Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Apt_Preset
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 Models, enabling artists to harness the latest AI tools to create incredible art.