Basic Syntax Tips for ComfyUI Prompt Writing

This article introduces some simple requirements and rules for prompt writing in ComfyUI.

This article will briefly introduce some simple requirements and rules for prompt writing in ComfyUI.

Part I: Basic Rules for Prompt Writing

Language Support

The language you should write prompts in depends on your model's text encoder — not necessarily English. Each text encoder is trained on specific language data:

  • SD1.5 / SDXL — use OpenAI's CLIP models, which were trained on English-centric datasets. English prompts work best, and non-English terms may produce unpredictable results.
  • SD3 / Flux — use T5-XXL (multilingual, trained on mC4 data covering hundreds of languages) alongside CLIP. These models understand prompts in Chinese, Japanese, Korean, French, German, Spanish, Russian, Arabic, and many more.
  • Newer models (e.g. Qwen3B based, etc.) — some models use multilingual text encoders or fine-tuned multilingual adapters specifically designed for non-English prompts. Check the model card for supported languages.
  • Community fine-tunes — some fine-tunes add multilingual support through LoRA or custom text encoders.

Rule of thumb: always check what text encoder your model uses and what languages it was trained on. Write prompts in a language the encoder understands well.

Phrase Usage

It is recommended to use phrases rather than complete sentences, and separate different phrases with English commas for easy management and weight adjustment.

Comment Support

Comfy UI supports comments, which can be made with a double slash (//) for single-line comments or multi-line comments (/* ... */).

Weight Management

The weight of prompts can be managed by their position in the list, with those at the beginning having higher weight and being more likely to be reflected in the generated image.

Part II: Weight Rules and Syntax for Comfy UI Prompts

Weight Expression

In Comfy UI, prompts can be weighted by adding a weight after the prompt in parentheses, for example, (Prompt: 1.5) means the weight of this phrase is 1.5 times the normal weight. It is recommended to keep it around 0.5 to 1.5.

Quick Weight Adjustment

Users can quickly adjust the weight by selecting the key phrase and using Ctrl plus the up or down arrow keys.

Downweighting Method

In webUI, square brackets ([]) are used to reduce the weight of a phrase, but the effect in Comfy UI may not be as expected.

Random Generation

The method of using curly braces {Prompt|Prompt|Prompt} can achieve random selection for generation, but the generated image will also increase randomness.

3.1 Structured Prompt Writing Rules

  • Subject
  • Features
  • Environment/Background
  • Style
  • Modifiers

4.1 ComfyUI-Custom-Scripts

This plugin provides a variety of enhancements, including prompt assistance, to improve the user experience when using Comfy UI.

For more information, please visit: GitHub - pythongosssss/ComfyUI-Custom-Scripts

4.2 ComfyUI ArtGallery

This plugin provides a visual preview of style prompts, helping users better understand and choose the appropriate prompt style.

For more information, please visit: GitHub - ZHO-ZHO-ZHO/ComfyUI-ArtGallery

Author's Bilibili video: Prompt Visualization | ComfyUI ArtGallery | Art Gallery | Stable Diffusion

4.3 comfyui-prompt-composer

This tool provides node-based management of prompts, helping users manage and combine prompts more effectively.

For more information, please visit: GitHub - florestefano1975/comfyui-prompt-composer

Comments

Sign in with GitHub to join the discussion.

Loading comments…