← See All Custom Node Packs

ComfyUI-WanVideoWrapper

6602
Updated about 2 months ago
View on GitHub →See Common Issues →

Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

WanVideoTextEncode

WanVideoTextEncode Node Documentation

Overview

The WanVideoTextEncode node is part of the WanVideoWrapper suite for ComfyUI, designed to transform text prompts into text embeddings that can be used in video generation workflows. This node is particularly useful for encoding both positive and negative prompts and supports advanced features like offloading models for efficient computation, caching, and handling multiple prompts for complex scenarios.

Functionality

This node encodes text prompts into a format that video generation models can use. It allows for the encoding of positive and negative prompts, supports device offloading for improved performance, and can store text embeddings on disk to speed up repeated operations with the same input.

Inputs

The WanVideoTextEncode node accepts the following inputs:

  1. Positive Prompt:

    • Type: STRING
    • Description: The positive text prompt to encode. Allows for multiple prompts separated by | for prompt travel over video frames.
  2. Negative Prompt:

    • Type: STRING
    • Description: The negative text prompt to encode.
  3. T5 Encoder (Optional):

    • Type: WANTEXTENCODER
    • Description: The T5 encoder model to use for text embedding. Must be provided unless disk caching is enabled.
  4. Force Offload (Optional):

    • Type: BOOLEAN
    • Default: True
    • Description: Whether to offload the model to a designated offload device after text encoding.
  5. Model to Offload (Optional):

    • Type: WANVIDEOMODEL
    • Description: The model that will be moved to the offload device before encoding.
  6. Use Disk Cache (Optional):

    • Type: BOOLEAN
    • Default: False
    • Description: Enables caching of text embeddings on disk for faster re-use. The cached embeddings are stored in text_embed_cache directory.
  7. Device (Optional):

    • Type: STRING
    • Options: ["gpu", "cpu"]
    • Default: gpu
    • Description: Specifies the device to use for text encoding, either GPU or CPU.

Outputs

The WanVideoTextEncode node produces the following output:

  1. Text Embeddings:
    • Type: WANVIDEOTEXTEMBEDS
    • Description: A dictionary containing the encoded text prompts which can be used as inputs for other video generation or manipulation nodes.

Usage in ComfyUI Workflows

The WanVideoTextEncode node can be used in ComfyUI workflows that require text input to control video generation or transformations. It is particularly useful in workflows that need to:

  • Encode complex prompts to direct video content with specific themes or narratives.
  • Differentiate between positive and negative conditions to fine-tune the output style or subject matter.
  • Utilize prompt travel to create dynamic shifts in video content by smoothly transitioning between multiple prompts.

Special Features and Considerations

  • Prompt Travel: Allows input of multiple prompts separated by | to create a seamless transition across video frames.
  • Caching: Supports disk caching of embeddings, which can significantly speed up operations in repetitive workflows.
  • Device Management: Offers facilities for offloading computation to dedicated devices, maximizing system resource management.
  • Weight Parsing: Can handle prompt weights to emphasize certain parts of the text prompt, offering nuanced control over the video content.

This node is an integral part of the text-to-video encoding process within ComfyUI, enabling users to input detailed textual narratives and influence the generated video content effectively.

Want to try ComfyUI-WanVideoWrapper without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.