Nodes/Comfyui-bitdance/BitDance Text Encode Cached
ComfyUI Node

BitDance Text Encode Cached

The node that stops your 14B text encoder from re-running every time

By aistudynow·Created 6 months ago·Updated 6 months ago· 33
BitDance Text Encode Cached
  • text_encoder
  • model_to_offload
  • positive
  • negative
  • positive_prompt
positive_prompt
negative_prompt
force_offloadfalse
devicegpu

Here's a speed tip the README gives away in its very first workflow line: use the Cached text encoder. BitDance's text encoding runs a full 14B Qwen3 LLM forward pass, which is the single most expensive step before sampling even starts. This node is the exact same encode as BitDance Text Encode, except it writes those embeddings to disk and reloads them on the next run. Change nothing about your prompt, and the encode step effectively becomes free. That turns "tweak the seed and wait five minutes" into "tweak the seed and wait for sampling only."

Everything about the inputs is identical to the plain version: text_encoder from the loader, multiline positive_prompt and negative_prompt, the same force_offload and model_to_offload VRAM knobs, and the same device (gpu/cpu) choice. It returns the same three outputs - positive and negative BITDANCE_TEXT_EMBEDS for the sampler, and a positive_prompt string passthrough.

What "cached" means here

Look closely at the two nodes' optional inputs and you'll spot the only real difference: the Cached version has no use_disk_cache toggle. It's not an option - it's the node's whole identity. Internally it always enables disk caching of the encoded prompt embeddings, keyed by prompt text. Run the same positive/negative pair again and the node loads the cached embeddings instead of waking the 14B model. Change a single word in either prompt and the cache misses, the LLM runs again, and a fresh entry is written.

That's a beautiful property when you're doing seed/step/CFG exploration - which is most of what you do after the prompt stops changing. It's also why the author's recommended starter flow is Loader → Text Encode Cached → Sampler → VAE Decode, not the plain encode node.

Where it falls short

The cache only helps when your prompt is stable. If you're in the "write a sentence, generate, rephrase, generate" phase of a session, every encode is a miss anyway, and the plain node's behavior is identical. And the cache lives on disk - if you're on a machine where disk I/O is brutal (network drives, spinning rust) the write itself can sting on first run, though it's still far cheaper than a 14B forward pass.

Same install either way: ComfyUI Manager → search "Comfyui-bitdance", or clone https://github.com/aistudynow/Comfyui-bitdance into custom_nodes, pip install -r requirements.txt, restart. One node's gotcha applies here too: the first encode on a cold start is slow and RAM-hungry while the FP8 text encoder dequantizes - the Cached version saves you from repeating that on every rerun, which is really the point.

Categoryconditioning/bitdance

Inputs (6)

NameTypeDefaultDescription
text_encoderBITDANCE_TEXT_ENCODER
positive_promptSTRING
negative_promptSTRING
force_offloadoptBOOLEANfalse
model_to_offloadoptBITDANCE_MODEL
deviceoptCOMBOgpu2 options: gpu, cpu

Outputs (3)

NameTypeDescription
positiveBITDANCE_TEXT_EMBEDS
negativeBITDANCE_TEXT_EMBEDS
positive_promptSTRING