Nodes/ComfyUI-WanVideoWrapper/WanVideo TextEncode
ComfyUI Node Runs on cloud

WanVideo TextEncode

Where your prompt goes in a Wan-wrapper graph

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo TextEncode
  • t5
  • model_to_offload
  • text_embeds
positive_prompt
negative_prompt
force_offloadtrue
use_disk_cachefalse
devicegpu

This is where you type. It takes your positive and negative prompts plus the loaded T5 encoder, and produces the WANVIDEOTEXTEMBEDS your sampler needs to know what to generate. In Kijai's wrapper, this node and the model loader are the two you'll touch on every single workflow.

Nothing exotic here - but Wan rewards prompting differently than SDXL or Flux, so the words you put in this box matter more than any parameter on the node.

How it works

Your prompt strings go through the umT5 encoder (loaded by LoadWanVideoT5TextEncoder) into conditioning embeddings. The node encodes both positive and negative in one shot and bundles them into a single output. There's also a neat trick baked in, per the node's description: for rudimentary prompt travel, you can put multiple prompts separated by | and they'll be spread evenly across the video length - so a clip can shift from one described state to another over its duration.

The inputs and outputs that matter

  • positive_prompt / negative_prompt - the two multiline boxes. For Wan the community rule is to write prose, not tag soup, and for image-to-video specifically to keep the image description and the motion description as two completely different prompts: describe the still flatly and technically, then describe only the motion. "For image you are a robot taking pictures, for i2v you are George R.R. Martin," as one experienced user put it.
  • t5 (optional) - the WANTEXTENCODER from the loader. Required in practice for the node to do its job.
  • device - gpu or cpu. CPU encoding is slower but frees VRAM for the model; handy on tight cards since the encoder only runs once per prompt.
  • use_disk_cache - caches encoded prompts to disk so re-running the same text skips the encode. Nice for iterating on settings while the prompt stays fixed.

Output is a WANVIDEOTEXTEMBEDS that plugs into the sampler's text_embeds input.

How to install it

Ships with the pack. Via ComfyUI Manager: search WanVideo Wrapper, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. You'll also need the umT5-XXL encoder downloaded into models/LLM for the t5 input to have anything to load.

Common issues & troubleshooting

Your negative prompt does nothing. This is the single most common Wan confusion, and it's not this node's fault. If you're running a speed LoRA (LightX2V, CausVid), CFG is pinned at 1.0, and at CFG 1 there's no classifier-free guidance - the negative prompt has nothing to act through. Either drop the speed LoRA and run CFG 3.5+, or use a NAG-style node to reintroduce negative control at CFG 1.

Over-describing the motion in I2V. If your image-to-video prompt restates what's already in the frame, you fight the model. Describe only the motion and action; let the start image carry the appearance.

Prompt travel isn't shifting. The | split spreads prompts across the clip, but on very short clips or with strong speed LoRAs the transition is subtle. It's "rudimentary" by the node's own admission - don't expect keyframe-precise control.

CategoryWanVideoWrapper

Inputs (7)

NameTypeDefaultDescription
positive_promptSTRING
negative_promptSTRING
t5optWANTEXTENCODER
force_offloadoptBOOLEANtrue
model_to_offloadoptWANVIDEOMODELModel to move to offload_device before encoding
use_disk_cacheoptBOOLEANfalseCache the text embeddings to disk for faster re-use, under the custom_nodes/ComfyUI-WanVideoWrapper/text_embed_cache directory
deviceoptCOMBOgpuDevice to run the text encoding on.

Outputs (1)

NameTypeDescription
text_embedsWANVIDEOTEXTEMBEDS