Nodes/ComfyUI-WanAnimatePlus/WanAnimatePlus TextEncodeCached
ComfyUI Node

WanAnimatePlus TextEncodeCached

Your T5 encoder — in, out, and gone before you notice

By wuwukaka·Created 4 months ago·Updated about a month ago· 409
WanAnimatePlus TextEncodeCached
  • extender_args
  • text_embeds
  • negative_text_embeds
  • positive_prompt
model_name
precisionbf16
positive_prompt
negative_prompt
quantizationdisabled
use_disk_cachetrue
devicegpu

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 from ComfyUI/models/text_encoders.
  • positive_prompt / negative_prompt - your prompts.
  • precision - fp32 or bf16 (default bf16, and for a big encoder bf16 is the sane default).
  • quantization - disabled or fp8_e4m3fn; fp8 shrinks the encoder's footprint further if VRAM is tight.
  • use_disk_cache - on by default; caches embeddings to disk under custom_nodes/ComfyUI-WanVideoWrapper/text_embed_cache (yes, the tooltip says WanVideoWrapper - the fork keeps the original's cache path).
  • device - gpu or cpu. 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.

CategoryWanAnimatePlus

Inputs (8)

NameTypeDefaultDescription
model_nameCOMBOThese models are loaded from 'ComfyUI/models/text_encoders'
precisionCOMBObf162 options: fp32, bf16
positive_promptSTRING
negative_promptSTRING
quantizationCOMBOdisabledoptional quantization method
use_disk_cacheBOOLEANtrueCache the text embeddings to disk for faster re-use, under the custom_nodes/ComfyUI-WanVideoWrapper/text_embed_cache directory
deviceCOMBOgpuDevice to run the text encoding on.
extender_argsoptWANVIDEOPROMPTEXTENDER_ARGSUse this node to extend the prompt with additional text.

Outputs (3)

NameTypeDescription
text_embedsWANVIDEOTEXTEMBEDSThe text embeddings for both prompts
negative_text_embedsWANVIDEOTEXTEMBEDSThe text embeddings for the negative prompt only (for NAG)
positive_promptSTRINGPositive prompt to display prompt extender results