prompt-engineering

Solid

ComfyUI prompt engineering knowledge — CLIP text encoding syntax, weight modifiers, model-specific prompting strategies, and best practices

AI & Automation 160 stars 30 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# ComfyUI Prompt Engineering ## CLIP Text Encoding Fundamentals ComfyUI uses CLIP (Contrastive Language-Image Pre-training) text encoders to convert text prompts into conditioning tensors. The `CLIPTextEncode` node takes a text string and a CLIP model, producing a `CONDITIONING` output for the KSampler. ### Token Limit CLIP processes text in **77-token chunks**. Each word is typically 1-3 tokens. Prompts exceeding 77 tokens are silently truncated unless you use the BREAK token or a multi-clip encoding node. ## Weight Syntax ### Emphasis (Attention Weights) Adjust how strongly the model attends to specific words or phrases: | Syntax | Effect | Equivalent Weight | |--------|--------|-------------------| | `(word:1.3)` | Increase emphasis by 30% | Explicit weight 1.3 | | `(word:0.7)` | Decrease emphasis by 30% | Explicit weight 0.7 | | `(word)` | Slight increase | `(word:1.1)` | | `((word))` | Moderate increase | `(word:1.21)` — 1.1^2 | | `(((word)))` | Strong increase | `(word:1.331)` — 1.1^3 | | `[word]` | Slight decrease | `(word:0.9091)` — 1/1.1 | | `[[word]]` | Moderate decrease | `(word:0.8264)` — 1/1.1^2 | ### Weight Rules - **Valid range**: 0.0 to 2.0 (going beyond 1.5 often causes artifacts) - **Default weight**: 1.0 for unmodified tokens - **Nesting stacks multiplicatively**: `((word))` = 1.1 * 1.1 = `(word:1.21)` - **Phrases**: `(red sports car:1.3)` applies weight to the entire phrase - **Mixing**: `(detailed face:1.4), (blurry background:0.6)` — combine in...

Details

Author
artokun
Repository
artokun/comfyui-mcp
Created
4 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Related Skills