Nodes/ComfyUI Prompt Control/PC: Apply Text Encoder Mods
ComfyUI Node

PC: Apply Text Encoder Mods

What Prompt Control's 'Apply Text Encoder Mods' is doing in your graph

By asagi4·Created 3 years ago·Updated 3 days ago· 427
PC: Apply Text Encoder Mods
  • clip
  • extra
  • CLIP
te_names
style
normalization

The display name hides what this is. "PC: Apply Text Encoder Mods" is the manual version of what ComfyUI Prompt Control's STYLE(...) prompt syntax does automatically - it changes how a CLIP text encoder interprets token weights, then hands you back the same CLIP, patched. On a normal workflow the pack does this in-process inside its encode nodes; this standalone node only shows up when someone wanted that patch applied directly to a CLIP.

What it actually does

ComfyUI encodes a prompt by running tokens through the text encoder's encode_token_weights function. Prompt Control's trick is to clone your CLIP, find each encoder you name, and wrap that function with a different weight interpretation and normalization. From then on, anything that encodes through that CLIP uses the new rules. That wrapping is exactly what this node does, exposed as a standalone step instead of being triggered by text.

Two practical consequences follow. First, feeding the output CLIP into a downstream encoder means your chosen style applies even to prompts that never mention STYLE() - a way to set a global interpretation. Second - and this is the part worth internalizing - it's marked experimental and dev_only in the source, and it doesn't even get a page in the pack's own docs. That combination is the strongest tell of an internal helper that leaked into the public node list. The intended path is writing STYLE(A1111, length) inside your prompt and letting PCTextEncode handle it.

The inputs that matter

For a node whose whole job is subtle, the field list is short:

  • clip - the model you're patching. You get it back out the other side.
  • te_names - comma-separated names of the encoders to patch: l,g for SDXL's two CLIPs (clip_l and clip_g), just l for SD 1.5-era models. The clip_ prefix is optional; it's worked out for you.
  • style - the weight interpretation. The real options are the same set STYLE() accepts: comfy (default), comfy++, compel, down_weight, A1111, perp.
  • normalization - none, length, or mean, and you can stack them with a +. comfy + none plus an empty extra is a no-op - the node just returns the clip untouched.
  • extra (optional) - a PC_EXTRA_DATA bundle that carries per-encoder clip weights and cutoff settings when the parser has produced them. You will not be hand-wiring this.

Output is a single CLIP that drops straight back into your encoding node's clip input.

When it's worth caring at all

Weight reinterpretation is a CLIP-era feature. SD 1.5, SDXL, Pony and Illustrious all respond to it; Flux's T5 and the newer LLM-style encoders don't parse (word:1.3) weighting the same way - the broader ecosystem consensus is that such syntax gets discarded there. So if this node is wired into a Flux workflow, that's a leftover from an SDXL template, and you can likely delete it. Where people get burned: the console warning TE model l not found on model patcher. Skipping... means a te_names entry doesn't exist on this clip - trying to patch g on a single-encoder SD 1.5 model is the classic miss. And if you can't find the node in the Add Node menu at all, that's the dev-only flag, not a broken install.

Getting it installed

It ships inside ComfyUI Prompt Control, by asagi4 (same author as ComfyUI Adaptive Guidance), and the whole pack installs in one step. Easiest: ComfyUI Manager → Install Custom Nodes → search ComfyUI Prompt Control → restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/asagi4/comfyui-prompt-control

Then restart ComfyUI. No model files to download and no extra Python packages - the prompt parser is vendored in the repo. One catch from the README: the current schema needs ComfyUI 0.8.0 or newer, so if nodes fail to load after install, update ComfyUI first and retry.

Categorypromptcontrol

Inputs (5)

NameTypeDefaultDescription
clipCLIP
te_namesSTRING
styleSTRING
normalizationSTRING
extraoptPC_EXTRA_DATA

Outputs (1)

NameTypeDescription
CLIPCLIP