Nodes/ComfyUI-HunyuanVideoWrapper/HunyuanVideo TextEmbeds Save
ComfyUI Node Runs on cloud

HunyuanVideo TextEmbeds Save

Stop re-running the text encoder every iteration

By kijai·Created 2 years ago·Updated 12 months ago· 2,595
HunyuanVideo TextEmbeds Save
  • hyvid_embeds
  • output_path
filename_prefixhyvid_embeds/hyvid_embed

Small node, real time savings. Hunyuan's text encoder is an LLM (Llava-Llama-3-8B), and running your prompt through it isn't free - it's one of the slower, more VRAM-hungry steps in the whole pipeline, and if you're iterating on samplers, LoRA strengths, or seeds while keeping the same prompt, you're paying that cost over and over for no reason. This node exists to let you pay it exactly once.

It takes the two things you'd expect: hyvid_embeds (from HyVideoTextEncode or HyVideoTextImageEncode) and a filename_prefix, defaulting to hyvid_embeds/hyvid_embed. It writes the computed embeddings to disk under your ComfyUI output/ directory at that path, and the single output - output_path, a plain string - tells you where it landed. That output isn't something you typically need to wire anywhere; it's mostly useful for confirming the save actually happened, or feeding into a downstream node if you're doing something more automated.

The real payoff shows up once you pair this with HyVideoTextEmbedsLoad: encode your prompt once, save it, then swap the encode-and-save half of your graph out for a single load node and iterate on everything downstream - sampler settings, LoRAs, seeds - without touching the LLM encoder again. On a workflow where you're doing a lot of sampler-tuning passes against a fixed prompt, that adds up fast.

It's also a decent way to share a "known good" setup with someone else without handing over your raw prompt text, or to build a small local library of pre-encoded prompts you reuse across projects - since the saved file is the embedding tensor, not a plain-text prompt file, though obviously anyone who loads it back into the same encoder gets the same result, so treat it as a cache rather than as any kind of privacy layer.

Installing the pack: ComfyUI Manager, search "HunyuanVideoWrapper," or manually cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper followed by pip install -r requirements.txt inside the folder - that pip step is the one people skip and then wonder why half the nodes (this one included) never show up in the node search. Restart ComfyUI after.

This node itself needs nothing beyond the base install - no extra models, since it's just writing tensors to disk. The only real trip-up is disk space if you're generating a lot of saved embeds and forgetting they're sitting under output/hyvid_embeds/ accumulating - they're small compared to video output files, but they're not nothing if you're saving dozens of variations per prompt.

One thing worth being deliberate about: change filename_prefix when you change the prompt. It's tempting to leave it on the default and just keep hitting save, but that means overwriting the same file every time, and you lose the ability to tell two saved prompts apart later just by filename. A quick convention - something that names the prompt or the project, not just "hyvid_embed" - pays off the first time you come back to a workflow a week later and can't remember which saved file was which.

CategoryHunyuanVideoWrapper

Inputs (2)

NameTypeDefaultDescription
hyvid_embedsHYVIDEMBEDS
filename_prefixSTRINGhyvid_embeds/hyvid_embed

Outputs (1)

NameTypeDescription
output_pathSTRING