Nodes/KepPromptLang/Special CLIP Loader
ComfyUI Node

Special CLIP Loader

The Little Node That Turns Prompts Into Math (Don't Skip It)

By M1kep·Created 3 years ago·Updated 5 months ago· 7
Special CLIP Loader
  • source_clip
  • CLIP

If you've ever pulled a workflow with a prompt like A sum(cat|dog|shark) outside or sum(diff(king|man)|woman) and watched it behave like plain text, here's the missing piece: that workflow runs on KepPromptLang's prompt language, and the language only wakes up when the CLIP has been routed through this node first. Special CLIP Loader is the on-switch. One input, one output, no settings - and it's easy to miss, because its entire job is invisible. That's exactly why people paste the fancy syntax and get ordinary words.

What you're actually signing up for. This pack (M1kep/KepPromptLang - the README still calls it ClipStuff, an older name) is a mini programming language for your prompt. It's the old "king − man + woman = queen" trick made practical: instead of a static prompt you write expressions that add, subtract, average, slerp or normalize embedding vectors. sum(), diff(), neg(), norm(), slerp(), avg(), mult(), rand(), plus embedding:word for textual-inversion triggers. All of it does arithmetic in the text encoder's embedding space before the transformer ever runs. It's a power-user toy - niche, fiddly, and genuinely fun when you want to blend two concepts in a controlled way instead of hoping a comma does it.

How it works. The trick is that the parser lives inside a custom tokenizer and a custom CLIP model, not in the Text Encode node. This node takes the CLIP you already have loaded (from Load Checkpoint) and rebuilds it: a fresh CLIP object built from KepPromptLang's own tokenizer and clip model, then it copies your checkpoint's text-encoder weights straight across. On SDXL it grabs both the clip_g and clip_l encoders; on SD 1.5 it grabs the single one. It even carries over your embeddings directory, so embedding:your_trigger still resolves to the .pt or .safetensors in your models folder. Same weights, same capacity - new grammar bolted on top.

What you actually touch. Nothing. That's the point:

  • source_clip (CLIP, required): wire in the CLIP output from Load Checkpoint.
  • Output: one CLIP, straight into a plain CLIP Text Encode. Your expression goes in that node's text box.

Two nodes and one wire unlock the whole language. No model downloads, no knobs to fiddle.

Where it falls over. It's CLIP-embedding arithmetic, so it only speaks the SD 1.5 / SDXL lineage - SD 1.5, SDXL, Illustrious, Pony, NoobAI and friends. SD 2.0 checkpoints hard-fail with an explicit "SD2 Clip model is not supported." And anything with a T5 or LLM text encoder (Flux, SD3, the Qwen/Mistral-encoder models that dominate 2026) is out of scope entirely, because there are no CLIP token vectors to do math on. It's the same architecture-lock that keeps textual-inversion embeddings from crossing families: they're bound to the encoder they were trained against.

Install. The real way, from the README:

cd ComfyUI/custom_nodes
git clone https://github.com/M1kep/KepPromptLang
pip install -r KepPromptLang/requirements.txt

Then restart ComfyUI. Or just search "KepPromptLang" in ComfyUI Manager. The dependencies are two small packages - lark (the grammar parser) and packaging - nothing heavy, no model files.

Troubleshooting.

  • Your expression renders as literal text and nothing happens: you bypassed this node and fed the checkpoint CLIP straight into CLIP Text Encode. The parser only runs inside this node's tokenizer, so route through it.
  • A ParseError in the console: your expression broke the grammar. Check the README's syntax table, and mind the | separators and quoted strings.
  • embedding:word loads but seems dead: the embedding is the wrong encoder's - an SD 1.5 vector won't bind to SDXL, and Pony's embedding space is famously picky. That's an embedding problem, not a node bug.

It's a gatekeeper node for a very specific power-user workflow. If you don't need prompt math, you don't need this pack. If you do, it's the first node you'll reach for.

Categoryconditioning

Inputs (1)

NameTypeDefaultDescription
source_clipCLIP

Outputs (1)

NameTypeDescription
CLIPCLIP