CogVideo TextEncode
Turning your prompt into CogVideoX conditioning
- clip
- conditioning
- clip
This is where your words become something the model can use. You type a prompt, this node runs it through CogVideoX's text encoder, and out comes a CONDITIONING - the numeric representation the sampler steers by. Every CogVideoX text-to-video graph has at least one of these, and usually two: one for your positive prompt and one for the negative.
CogVideoX uses a large T5-family text encoder, which is worth knowing because it rewards detailed, descriptive prompts. This isn't a tag-soup model - it responds to natural, sentence-style descriptions of the scene and the action. The community's rule of thumb for video prompting carries over well: describe the subject like you're captioning a photo, then describe the motion like you're narrating what happens next. Long and specific beats short and vague.
The inputs and outputs that matter
clip- the text encoder, supplied by a text-encoder loader upstream (the T5 encoder CogVideoX uses). This is required; the node encodes through it.prompt- your text, and it's multiline, so write freely. Positive prompts describe what you want; in the negative-prompt instance of this node you list what to avoid.strength(optional, default 1) - how forcefully this conditioning weighs in. 1 is normal; adjust if you're balancing multiple conditionings.force_offload(optional, default on) - moves the text encoder off the GPU after it's done encoding, freeing VRAM for the sampler. Leave it on; text encoders are big and you want that memory back before generation. That default is doing you a quiet favor.
Outputs are conditioning (the CONDITIONING that goes to the sampler's positive or negative input) and a pass-through clip so you can chain the encoder into another TextEncode node without reloading it.
How to install it
Bundled with the wrapper:
- ComfyUI Manager - search ComfyUI-CogVideoXWrapper, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-CogVideoXWrapper, thenpip install -r ComfyUI-CogVideoXWrapper/requirements.txt, restart.
You'll also need the T5 text-encoder weights loaded through a loader node - the CogVideoX models expect that encoder, and it's a chunky download in its own right.
Common issues & troubleshooting
The prompt isn't landing. Give it more to work with. Short prompts under-specify what this encoder can use - spell out the subject, setting, and especially the motion in plain sentences. And route the conditioning to the correct slot: positive prompt to positive, negative to negative. Swapping them quietly wrecks your output.
Out of memory right at text encoding. The T5 encoder is large. Keep force_offload on so it clears off the GPU before sampling starts. If you're still tight, a quantized (GGUF) T5 encoder frees a lot of room while barely touching quality.
Chaining two prompts. Use the clip pass-through output to feed your second TextEncode instead of loading the encoder twice - one load, two encodes.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| strengthopt | FLOAT | 1.000–10 | — |
| force_offloadopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| clip | CLIP | — |