Nodes/comfyui_davcha/CLIP Text Encode (Davcha)
ComfyUI Node

CLIP Text Encode (Davcha)

Weights, schedules, lists and AREA regions in one node

By dchatel·Created 2 years ago·Updated 13 days ago· 2
CLIP Text Encode (Davcha)
  • clip
  • CONDITIONING
text

The stock CLIP Text Encode is deliberately boring. This one is the Swiss army knife version: it can handle prompt editing, multi-prompt lists, and regional (area) conditioning, all from one text box, and it hands you a list of conditionings instead of a single blob. If you've been assembling those behaviors from three separate custom packs, this collapses them into one node.

It ships in comfyui_davcha, one author's "personal QoL and experimental nodes" collection, and it's genuinely experimental - some corners of the parse are rough.

What the text box understands

  • [a:b:t] prompt editing - swap from prompt a to prompt b at step fraction t. This is the classic "subject transforms over the sampling run" trick. The node expands multiple edits and even composes them (it takes the product of all combos), which the stock encoder doesn't do.
  • | as a segment separator - each pipe-delimited chunk becomes its own conditioning. This is WebUI's AND behavior: two prompts joined rather than merged into one token soup.
  • AREA(x, y, w, h, s) - regional prompting. The numbers are percentages of the canvas plus a strength s. Assign different prompts to different parts of the image - two characters, each with their own attributes - without them bleeding into each other. This is the same technique as Latent Couple / Regional Prompter, just with a terser syntax.
  • Empty text - encodes an empty conditioning, which is occasionally useful for negative side wiring.

How it works

The text is split on |, each segment is scanned for AREA(...) and [a:b:t] patterns (via regex and a combinatorial itertools.product pass), and every fragment gets encoded separately. Scheduled fragments get start_percent/end_percent set on the conditioning; AREA fragments get area (percentage-based), strength, and set_area_to_bounds: false. The output is a list of CONDITIONING - that's the OUTPUT_IS_LIST flag - and you feed it into the sampler's positive or negative input where ComfyUI treats a conditioning list as a batch.

Inputs: text (multiline) and clip. Output: CONDITIONING (list).

Installing it

# ComfyUI Manager → Install Custom Nodes → search "comfyui_davcha" → Install → Restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/dchatel/comfyui_davcha
cd comfyui_davcha
pip install -r requirements.txt

Pack-level catch as always: the module imports llama_cpp and cv2 at load even though requirements.txt only has webp and rapidfuzz. If the pack doesn't load, pip install llama-cpp-python opencv-python and restart.

Where people get burned

This is CLIP-era tooling. (word:1.3) attention weights and all this scheduling machinery mean nothing on the new LLM-encoded models - the syntax gets passed through as literal punctuation there, per the community's hard-won experience. Stick to SD1.5/SDXL-family CLIP encoders. Also expect rough edges: the source prints its parse results to the console on every run, and the AREA syntax here is terser and less forgiving than dedicated regional packs. For serious two-subject work, Regional Prompter is still the better-trodden path; this is the "one node does everything" option.

Categorydavcha

Inputs (2)

NameTypeDefaultDescription
textSTRINGThe text to be encoded.
clipCLIPThe CLIP model used for encoding the text.

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING