ComfyUI Prompt Guide: Write Better Prompts for AI Image Generation
Learn how to write effective prompts in ComfyUI — syntax rules, weight control, structured prompt patterns, and tips for better AI-generated images.
How Prompts Work in ComfyUI
Prompts are text descriptions that tell the AI what to generate. In ComfyUI, prompts are processed by the CLIP Text Encode node, which converts your text into numerical vectors the model understands.
There are two types:
- Positive prompt — describes what you want in the image
- Negative prompt — describes what you want to avoid
Basic Syntax Rules
Write in English
CLIP models are trained on English text. Write prompts in English for best results.
For newer models like Flux and SD 3.5, natural language sentences work well. For SD 1.5 and SDXL, comma-separated keyword phrases tend to perform better.
Prompt Structure
A well-structured prompt follows this pattern:
[Subject], [Features], [Environment/Background], [Style], [Quality modifiers]Example:
1girl, long black hair, red dress, standing in a flower garden,
golden hour lighting, anime style, masterpiece, best quality,
highly detailedSeparate with Commas
Use commas to separate different concepts. This makes it easy to manage and adjust individual elements.
Comments
ComfyUI supports comments in prompts:
- Single-line:
// this is a comment - Multi-line:
/* this is a block comment */
Useful for annotating complex prompts without affecting generation.
Weight Control
Syntax
Adjust how strongly the AI follows specific parts of your prompt:
| Syntax | Effect | Example |
|---|---|---|
(prompt:1.5) | Set exact weight (1.0 = normal) | (blue eyes:1.3) |
(prompt) | Increase weight to 1.1x | (detailed hands) |
((prompt)) | Increase weight to ~1.21x | ((sharp focus)) |
Keyboard Shortcuts
Select a word or phrase in the text field, then:
| Shortcut | Effect |
|---|---|
Ctrl + Up Arrow | Increase weight by 0.05 |
Ctrl + Down Arrow | Decrease weight by 0.05 |
Weight Guidelines
- Keep weights between 0.5 and 1.5 for best results
- Weights above 1.5 often cause visual artifacts
- Weights below 0.5 may have negligible effect
Random Selection
Use curly braces to make ComfyUI randomly pick one option per generation:
{red|blue|green} dressEach generation will randomly choose one color. Useful for exploring variations quickly.
Prompt Position Matters
Keywords placed earlier in the prompt have slightly higher influence. Put your most important elements first:
portrait of a woman, detailed face, soft lighting, studio photoHere, "portrait of a woman" has the strongest influence on the output.
Quality Enhancement Keywords
Add these to your positive prompt to improve output quality:
| Keywords | Effect |
|---|---|
masterpiece, best quality | General quality boost |
highly detailed, sharp focus | Increases detail level |
professional, studio lighting | Professional photography feel |
HDR, vivid colors | Rich colors and dynamic range |
8k, ultra-high resolution | Sharper output |
bokeh, depth of field | Background blur effect |
Common Negative Prompt Keywords
Add these to your negative prompt to avoid common issues:
low quality, worst quality, blurry, watermark, text, logo,
deformed, bad anatomy, extra fingers, extra limbs, disfigured,
cropped, out of frameFor SD 1.5, detailed negative prompts make a significant difference. For Flux and SD 3.5, negative prompts have less impact — these models rely more on strong positive prompts.
Model-Specific Prompt Tips
| Model | Prompt Style |
|---|---|
| SD 1.5 | Keyword phrases, separated by commas. Strong negative prompts help a lot |
| SDXL | Similar to SD 1.5 but handles longer, more complex prompts |
| SD 3.5 | Natural language sentences work well. Lower cfg (3.5–5.0) |
| Flux | Natural language, very strong prompt understanding. cfg = 1.0 |
| Video models (Wan, Hunyuan) | Describe motion and scene. Be specific about actions |
Useful Tools
Prompt Helper Plugins
- ComfyUI-Custom-Scripts — Autocomplete for embedding names in the text field
- ComfyUI-ArtGallery — Visual preview of style prompts
- comfyui-prompt-composer — Node-based prompt management
Prompt Reference Sites
- Civitai — Browse model pages for example prompts
- OpenArt — Workflow and prompt examples
- PromptHero — Prompt database with generated examples
Common Issues and Fixes
Output ignores my prompt
- Increase
cfgvalue (for SD 1.5/SDXL) - Simplify the prompt — too many competing concepts confuse the model
- Check that the model matches your prompt style (anime model won't produce photorealism)
Specific element keeps appearing despite not being prompted
- Add it to your negative prompt
- Check if the base model has a strong bias (some fine-tuned models default to certain styles)
Prompt syntax not working
- Make sure you're using standard parentheses
(), not Chinese parentheses - Weight syntax is
(word:1.3)— no spaces around the colon
Related Guides
- Text to Image — Basic generation workflow
- Embeddings Guide — Compressed prompt shortcuts
- LoRA Guide — Style and subject fine-tuning
ComfyUI Embeddings Guide: Textual Inversion for Style & Quality
How to download, install, and use embedding (Textual Inversion) models in ComfyUI to apply styles, improve quality, or add concepts with a single keyword.
ComfyUI Interface Guide: Navigation, Nodes & Shortcuts
A visual guide to the ComfyUI interface — menu layout, node operations, keyboard shortcuts, and essential UI features for beginners.
Documentation Wonderful Launcher