Nodes/Comfyui_image2prompt/CLIP Advanced Text Encode 🐼
ComfyUI Node

CLIP Advanced Text Encode 🐼

CLIP Advanced Text Encode 🐼 — ComfyUI Node Guide

By zhongpei·Created 3 years ago·Updated about a year ago· 386
CLIP Advanced Text Encode 🐼
  • clip
  • CONDITIONING
text
token_normalization
weight_interpretation

What it is

A drop-in replacement for the stock CLIP Text Encode node, aimed at one specific problem: ComfyUI's native (word:1.3) attention-weight syntax isn't the only way people write weighted prompts, and if you're used to Automatic1111's syntax or the compel library's approach, the numbers don't mean quite the same thing across all three. This node lets you pick which weighting dialect you're writing in and how the resulting per-token weights get normalized before they hit the model.

The one thing worth knowing before you reach for it at all: attention weighting only exists on CLIP text encoders. SD 1.5, SDXL, and the Illustrious/NoobAI/Pony lineage all still use CLIP, and this node is squarely for them. If you're running a 2025-2026 LLM-encoded checkpoint - Z-Image, Flux 2 Klein, Anima - prompt weighting syntax isn't implemented on that encoding path at all. The parentheses and colons don't get ignored gracefully either; they get read as literal punctuation inside your prompt, which is worse than not using them. This node won't fix that, because nothing can - it's an architecture limit, not a settings problem.

How it works

You give it a CLIP model and your prompt text, same as the stock node. Internally, it parses whatever weighting syntax your weight_interpretation choice expects, converts each token's weight into ComfyUI's internal representation, and applies token_normalization to keep the overall magnitude of the encoded conditioning sane rather than letting heavily-weighted prompts blow out proportionally.

Inputs and outputs

  • text - your prompt, written in whichever weighting syntax matches your weight_interpretation choice.
  • clip - the CLIP model to encode against.
  • token_normalization - none, mean, length, or length+mean. Controls how token weights get rescaled after parsing, so a prompt with several heavily-weighted terms doesn't just get louder overall in a way that pushes it out of the range the model expects.
  • weight_interpretation - comfy, A1111, compel, comfy++, or down_weight. This is the actual dialect switch: pick A1111 if you're pasting prompts written for Automatic1111/Forge, compel if you're used to that library's weighting math, comfy to match ComfyUI's own native behavior, and so on.

Output: a single CONDITIONING, same as the stock CLIP Text Encode - wire it straight into your sampler.

Installing it

Ships with the rest of this pack:

cd ComfyUI/custom_nodes
git clone https://github.com/zhongpei/Comfyui_image2prompt

Or install via ComfyUI Manager, searching "Comfyui_image2prompt." (The README's own clone command is typo'd to a hyphenated URL - use the underscored one above.) Restart ComfyUI afterward. No model download is needed beyond the CLIP you're already loading elsewhere in your workflow.

Common issues

Using it on an LLM-encoded model and wondering why weighting does nothing. This is the single most common mistake with attention syntax in general right now, not specific to this node - check what your checkpoint's text encoder actually is before assuming a weighting problem is a bug.

Mismatched syntax and dialect setting. If you write A1111-style (word:1.3) but leave weight_interpretation on comfy, or vice versa, the parsing won't match what you intended and the result will be subtly off rather than obviously broken - worth double-checking this setting matches the syntax you're actually pasting in, especially if you copied a prompt from somewhere else.

Stacking weights too aggressively still causes artifacts here, same as on the stock node - (((word)))-style compounding isn't a normalization node's job to save you from; keep individual weights in the roughly 0.5-1.5 range regardless of which dialect you're using.

Categoryfofo🐼/conditioning

Inputs (4)

NameTypeDefaultDescription
textSTRING
clipCLIP
token_normalizationCOMBO4 options: none, mean, length, length+mean
weight_interpretationCOMBO5 options: comfy, A1111, compel, comfy++, down_weight

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING