XB-BOX - ✍️ Wan 文本编码
Two prompt boxes, one T5 pass
- t5_model
- text_embeds
In the XB-BOX Wan chain this is the node between the text encoder and the sampler: it takes your positive and negative prompts, runs them through the WANTEXTENCODER from XB_WanT5Loader, and emits the WANVIDEOTEXTEMBEDS that the sampler conditions on. Display name "✍️ Wan 文本编码". Functionally it's the Wan equivalent of CLIP Text Encode - with one twist that makes it worth having: prompt caching on disk.
How it works
It delegates to the ComfyUI-WanVideoWrapper's WanVideoTextEncode with two extra knobs exposed. use_disk_cache (on by default) caches the encoded result on disk keyed by model and prompt, so when you're iterating on seeds or re-running a workflow with an unchanged prompt, it skips the expensive T5 forward pass entirely. That's a real speedup - encoding a long prompt with umt5-xxl isn't instant, and video workflows re-run the same prompt a lot while you hunt for the seed. The device dropdown (gpu/cpu, default gpu) decides where the encoding runs; CPU encoding works but is slow, so leave it on gpu unless you're fighting VRAM.
The inputs
All four are on the node face:
- t5_model - the
WANTEXTENCODERoutput of XB_WanT5Loader. Wire this or the node does nothing useful. - positive_prompt - your prompt, multiline.
- negative_prompt - your negative, multiline. Wan's negatives are more forgiving than SDXL's but still do work; keep them short and concrete.
- use_disk_cache - leave on.
- device - gpu.
Output: a single text_embeds socket that feeds the sampler's text_embeds input (or feeds the image encoder if your workflow routes it that way).
Install
Pack install is the standard XB_BOX route - ComfyUI Manager search XB_ToolBox, or clone into custom_nodes and restart. It needs XB_WanT5Loader upstream and the ComfyUI-WanVideoWrapper installed, same as the rest of the Wan nodes. No model files of its own.
Common issues
The obvious failure is a missing WANTEXTENCODER - i.e. you skipped the loader or the wrapper isn't installed. One thing that trips people: the disk cache is keyed on the model and prompt, so if you switch to a different T5 file or edit your prompt, the cache re-computes - that's expected, not a bug. And if encoding is mysteriously slow, check you're not on device: cpu from a previous experiment.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| t5_model | WANTEXTENCODER | — | |
| positive_prompt | STRING | — | |
| negative_prompt | STRING | — | |
| use_disk_cache | BOOLEAN | true | — |
| device | COMBO | gpu | 2 options: gpu, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text_embeds | WANVIDEOTEXTEMBEDS | — |