The Error Message
You're loading a workflow in ComfyUI β then this hits:
KeyError: 'CLIPTextEncode'
The backend tried to look up CLIPTextEncode in its node registry and came up empty. Since this is one of ComfyUI's core nodes, a missing definition almost always points to a broken install, an outdated build, or a corrupted workflow file.
Why This Happens
Four causes account for most cases:
- Version mismatch: You're running a workflow built on a newer ComfyUI commit. Your local copy doesn't know about that node's updated implementation yet.
- Corrupted installation: Files inside
comfy/ornodes.pyhave been modified, partially deleted, or overwritten by a bad update. - Mangled JSON: Workflows copied from web snippets, pastebin, or chat messages often get garbled in transit. The
typefield can end up asCLIPTextEncodβ one missing character is enough to trigger the error. - Custom node conflict: Some third-party nodes try to override core nodes. If such a node crashes on load, it can silently unregister
CLIPTextEncodealong with itself.
Fix 1: Update ComfyUI Core
Version mismatch is the most common culprit. Pull the latest changes before trying anything else.
Open a terminal in your ComfyUI root folder and run:
git pull
pip install -r requirements.txt
On the portable Windows build? Run update_comfyui.bat from the update/ folder instead. Restart the server once it finishes.
Fix 2: Use ComfyUI-Manager to Restore Missing Nodes
Some workflows rely on a custom CLIP encoder β an SDXL-specific conditioning node, for example β that your system doesn't have installed. ComfyUI-Manager can scan for gaps and fill them in.
- Open ComfyUI in your browser.
- Click Manager in the side panel.
- Select Install Missing Custom Nodes.
- If
CLIPTextEncodeor any conditioning node appears in the list, install it and restart.
Fix 3: Repair the Workflow JSON
Sometimes the problem isn't your install β it's the file. Workflows shared as Base64 strings or pasted through chat often lose characters in transit. A single misquote or stripped bracket is enough to make the node type unreadable.
Decode the string manually and look for "type": "CLIPTextEncode" inside the nodes array. I use this Base64 tool to decode and inspect the raw JSON. If the workflow came in as a URL-encoded string, run it through a URL decoder first β special characters like + and %22 can corrupt field names silently.
Fix 4: Delete and Reconnect the Node
Workflow opens but shows a red box where the prompt node should be? The node ID is probably orphaned. Here's what to do:
- Note which wires connect to the broken node (CLIP input, conditioning output).
- Delete the red
CLIPTextEncodenode. - Right-click β Add Node β conditioning β CLIP Text Encode (Prompt).
- Reconnect the wires.
- Save the workflow as a new JSON file.
Prevention
A few habits that will keep this from coming back:
- Pull weekly: ComfyUI ships node definition changes frequently. A weekly
git pullkeeps you in sync and avoids version drift. - Back up stable workflows: Don't rely on
last_workflow.json. Save working setups as named JSON files in a dedicated folder. - Use a virtual environment: A dedicated
venvor Conda environment ensures other Python projects can't quietly break ComfyUI's dependencies.
Verifying the Fix
Restart ComfyUI, then hard-refresh your browser with Ctrl+F5. Load the workflow. A healthy CLIPTextEncode node shows a green or violet header β no red outline. Queue a prompt. If the console prints something like Prompt executed in 3.2 seconds, you're done.

