Griptape Convert: Text to CLIP Encode
The node that turns LLM output into something your sampler can use
- clip
- OUTPUT
This is the bridge node in a Griptape workflow. Your agent - an LLM - writes text: a refined prompt, an image description, a summarized reference. But the diffusion sampler downstream doesn't understand plain text. It understands CLIP conditioning: the token embeddings that come out of your checkpoint's text encoder. Griptape Convert: Text to CLIP Encode is what turns one into the other.
The name tells you the design: it converts text that already exists (as opposed to the sibling Griptape Create: CLIP Text Encode, which also lets you type the string inline). If you're running the classic agent loop - describe a reference image, have the LLM improve the prompt, feed that improved prompt to the sampler - this is the node sitting right before the KSampler.
How it works
Nothing magic here, and no API key involved. The node takes two inputs: STRING (the text, wired in from wherever your agent produced it) and clip (the CLIP model from your checkpoint loader). It runs the text through the CLIP encoder exactly like ComfyUI's built-in CLIPTextEncode does:
tokens = clip.tokenize(STRING)
cond, pooled = clip.encode_from_tokens(tokens, return_pooled=True)
return ([[cond, {"pooled_output": pooled}]],)
That output is a standard CONDITIONING that drops straight into a KSampler's positive (or negative) input. Because it returns the pooled output too, you can even use it to build a batch of similar conditioning vectors, the same way the native node does.
Inputs and outputs
- STRING - required, forced input; you can't type here, you have to wire it in. That's intentional: it guarantees the text is coming from somewhere else in the graph.
- clip - required; connect the
CLIPoutput from your checkpoint loader. - OUTPUT - the
CONDITIONINGfor your sampler.
That's the whole node. It's also marked as an output node in the pack, so it'll render as a final "display" node in the graph.
Install
Standard Griptape install - ComfyUI Manager (search "Griptape") or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
The pack installs griptape[all] and python-dotenv. This particular node doesn't need the heavy framework at all, but it ships in the pack, so you get the whole dependency tree regardless. One legit reason to keep this pack around even if you never build an agent: it's a clean, low-friction way to route LLM text into the sampler.
Common gotchas
The classic mistake is wiring the LLM's response into a normal text box and expecting the sampler to read it - it won't, because nothing converts it to tokens. This node is the missing link. The other gotcha: make sure the clip input matches the checkpoint family you're sampling with. A Qwen- or LLM-encoded model won't have CLIP conditioning in the same sense, so this node is really aimed at the classic SD/SDXL/Flux-style pipelines that still take CLIP text. And since it's an output node, don't be surprised when it shows up as a terminal step even though it feeds a KSampler.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| STRING | STRING | — | |
| clip | CLIP | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OUTPUT | CONDITIONING | — |