ComfyUI > Nodes > ComfyUI-HunyuanVideoWrapper > HunyuanVideo TextEncode

ComfyUI Node: HunyuanVideo TextEncode

Class Name

HyVideoTextEncode

Category
HunyuanVideoWrapper
Author
kijai (Account age: 2506days)
Extension
ComfyUI-HunyuanVideoWrapper
Latest Updated
2025-05-12
Github Stars
2.4K

How to Install ComfyUI-HunyuanVideoWrapper

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

HunyuanVideo TextEncode Description

Facilitates encoding text for video processing, integrating textual prompts into video workflows for AI artists.

HunyuanVideo TextEncode:

The HyVideoTextEncode node is a component of the HunyuanVideo framework, designed to facilitate the encoding of textual data into a format suitable for video processing. This node serves as a bridge between text inputs and video outputs, enabling the seamless integration of textual prompts into video generation workflows. By leveraging advanced text encoding techniques, HyVideoTextEncode allows you to input descriptive text prompts that can influence video content creation, making it a powerful tool for AI artists looking to incorporate narrative or thematic elements into their video projects. The node's primary goal is to transform text into a structured format that can be utilized by video models to generate or modify video content, thus enhancing the creative possibilities within the HunyuanVideo ecosystem.

HunyuanVideo TextEncode Input Parameters:

text_encoders

This parameter specifies the text encoder to be used, identified by the type HYVIDTEXTENCODER. It is a required input that determines how the text prompt will be processed and encoded. The choice of text encoder can significantly impact the quality and style of the resulting video, as different encoders may interpret and emphasize various aspects of the text differently.

prompt

The prompt parameter is a required string input that allows you to provide the textual description or narrative you wish to encode. This parameter supports multiline text, enabling you to craft detailed and complex prompts. The content of the prompt directly influences the video output, as it serves as the primary source of information for the encoding process.

force_offload

This optional boolean parameter, with a default value of True, determines whether the model should be offloaded to a secondary device before encoding. Enabling this option can help manage memory usage and improve performance, especially when working with large models or complex prompts.

prompt_template

The prompt_template parameter offers a selection of predefined templates, including I2V_video, I2V_image, and disabled, with I2V_video as the default. These templates provide a structured format for the prompt, guiding the text encoder in interpreting the input. Choosing the appropriate template can enhance the alignment between the text and the desired video output.

clip_l

This optional parameter allows you to use a CLIP model instead of the default text encoder. It includes a tooltip suggesting that the text encoder loader's clip_l should be disabled if this option is selected. Utilizing a CLIP model can offer different interpretative capabilities, potentially leading to varied video outputs based on the same text prompt.

image

The image parameter is an optional input that can be used to provide an image alongside the text prompt. This can be particularly useful for tasks that require visual context or when the image is intended to complement the text in influencing the video generation process.

hyvid_cfg

This parameter is an optional configuration input specific to the HunyuanVideo framework. It allows for additional customization and fine-tuning of the encoding process, enabling you to adjust settings that may affect the final video output.

image_embed_interleave

An optional integer parameter with a default value of 2, image_embed_interleave controls the degree to which the image influences the encoding process relative to the text prompt. A higher value increases the influence of the text, while a lower value gives more weight to the image.

model_to_offload

This optional parameter specifies the HYVIDEOMODEL to be moved to an offload device before encoding. It includes a tooltip indicating its purpose, which is to manage resource allocation and optimize performance during the encoding process.

HunyuanVideo TextEncode Output Parameters:

hyvid_embeds

The output parameter hyvid_embeds represents the encoded text in a format suitable for video processing within the HunyuanVideo framework. This output is crucial as it serves as the intermediary data that video models use to generate or modify video content based on the provided text prompt. The quality and characteristics of the hyvid_embeds directly influence the resulting video, making it a key component in the creative workflow.

HunyuanVideo TextEncode Usage Tips:

  • Experiment with different text encoders and prompt templates to see how they affect the video output. This can help you find the best combination for your specific project needs.
  • Utilize the image parameter to provide visual context when necessary, especially if the text prompt alone does not fully convey the desired theme or narrative.
  • Adjust the image_embed_interleave value to balance the influence of text and image inputs, depending on whether you want the video to be more text-driven or image-driven.

HunyuanVideo TextEncode Common Errors and Solutions:

"Invalid text encoder specified"

  • Explanation: This error occurs when the specified text encoder is not recognized or supported by the node.
  • Solution: Ensure that you are using a valid HYVIDTEXTENCODER type and that it is correctly configured in your environment.

"Prompt cannot be empty"

  • Explanation: The node requires a non-empty prompt to function, and this error indicates that the prompt input is missing or blank.
  • Solution: Provide a valid text prompt in the prompt parameter to proceed with the encoding process.

"Model offloading failed"

  • Explanation: This error suggests that the model could not be offloaded to the specified device, possibly due to resource constraints or configuration issues.
  • Solution: Check the device configuration and ensure that there is sufficient memory available for offloading. Adjust the force_offload setting if necessary.

HunyuanVideo TextEncode Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-HunyuanVideoWrapper
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.