WanAnimatePlus TextEncodeCached
Your T5 encoder — in, out, and gone before you notice
- extender_args
- text_embeds
- negative_text_embeds
- positive_prompt
The Wan text encoder - a T5-sized model - is the part of a video workflow that loves to sit in VRAM and never leave, even though it's only needed for a few seconds at the start of a run. This node's whole personality is "in and out": it loads the T5, encodes your prompts, caches the result, and completely unloads the model, leaving no VRAM or RAM imprint. If you've run the same prompts before, it doesn't even load the T5 - it reads the cache and moves on. For a 14B video model fighting for every gigabyte, that's a genuinely useful habit.
It's Kijai's WanVideoTextEncodeCached, re-exported under the WanAnimatePlus prefix so the pack's chains stay isolated. The description is worth quoting because it's unusually clear about the two other tricks: the negative output is "meant to be used with NAG" (negative-aware guidance - it carries only the negative embeddings), and you can optionally attach a Qwen LLM through the extender_args input to extend your positive prompt with a Wan-style template or a custom system prompt.
What you set
model_name- the T5 checkpoint, loaded fromComfyUI/models/text_encoders.positive_prompt/negative_prompt- your prompts.precision-fp32orbf16(default bf16, and for a big encoder bf16 is the sane default).quantization-disabledorfp8_e4m3fn; fp8 shrinks the encoder's footprint further if VRAM is tight.use_disk_cache- on by default; caches embeddings to disk undercustom_nodes/ComfyUI-WanVideoWrapper/text_embed_cache(yes, the tooltip says WanVideoWrapper - the fork keeps the original's cache path).device-gpuorcpu. Encoding on CPU is slow but frees the card entirely; useful if the encoder is fighting the model for VRAM.
The outputs: text_embeds (both prompts), negative_text_embeds (negative-only, for NAG), and positive_prompt (a string reflecting any prompt-extender rewrites, handy for checking what the LLM did to your words).
The mental model
Think of it as the "self-cleaning" text encoder. The cache key means repeat runs with the same prompt skip the forward pass entirely, and the unload means the T5 is never parked in VRAM while you're sampling. If you've ever watched a Wan workflow OOM because the T5 lingered, this node is the answer - and the cost is a couple of seconds of re-loading on cache misses.
Install
Same as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/wuwukaka/ComfyUI-WanAnimatePlus.git
Restart ComfyUI, or use ComfyUI Manager (search "ComfyUI-WanAnimatePlus"). The T5 lives in ComfyUI/models/text_encoders; the README also asks for the original ComfyUI-WanVideoWrapper to be present, and dependencies come from requirements.txt. As always with this pack: don't mix WanAnimatePlus nodes with original WanVideoWrapper nodes in the same workflow.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | These models are loaded from 'ComfyUI/models/text_encoders' | |
| precision | COMBO | bf16 | 2 options: fp32, bf16 |
| positive_prompt | STRING | — | |
| negative_prompt | STRING | — | |
| quantization | COMBO | disabled | optional quantization method |
| use_disk_cache | BOOLEAN | true | Cache the text embeddings to disk for faster re-use, under the custom_nodes/ComfyUI-WanVideoWrapper/text_embed_cache directory |
| device | COMBO | gpu | Device to run the text encoding on. |
| extender_argsopt | WANVIDEOPROMPTEXTENDER_ARGS | Use this node to extend the prompt with additional text. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text_embeds | WANVIDEOTEXTEMBEDS | The text embeddings for both prompts |
| negative_text_embeds | WANVIDEOTEXTEMBEDS | The text embeddings for the negative prompt only (for NAG) |
| positive_prompt | STRING | Positive prompt to display prompt extender results |