Prompting Syntax | InvokeAI Documentation

Prompting Syntax

InvokeAI supports Compel-style prompt weighting and prompt functions for SD 1.5 and SDXL text conditioning workflows. Recent model families, including FLUX, Z-Image, CogView4, and Qwen Image, bypass Compel and do not use the syntax documented on this page. This page documents syntax for those Compel-based workflows only. If you want general advice on writing better prompts, start with Prompting Guide.

Quick reference

Supported syntax

Attention weighting with + and -

Append + to increase influence, or - to reduce it.

freckles+

background crowd-

(soft rim light)++

Rules of thumb:

Numeric weights

Use numeric weights when you want precise control instead of repeated plus or minus markers.

(cinematic lighting)1.25

(background crowd)0.8

(sharp focus)1.1

Guidelines:

Grouping and nesting

You can group phrases and apply weight to the whole group, then nest another weighted phrase inside it.

(portrait with (blue eyes)1.3)1.1

In this example, the outer group strengthens the whole phrase, and the inner group gives blue eyes even more emphasis.

Blend prompts with .blend()

Use .blend() to mix the meaning of two or more prompts.

("portrait photo, 85mm lens", "oil painting, visible brushstrokes").blend(0.7, 0.3)

This is most useful for combining concepts or styles that you want balanced deliberately.

Tips:

Combine clauses with .and()

Use .and() when you want separate prompt clauses encoded individually instead of as one long comma-separated sentence.

("red silk dress", "studio portrait", "soft rim light").and()

This can behave differently from:

red silk dress, studio portrait, soft rim light

If a normal prompt keeps collapsing ideas together, .and() is worth testing.

Escape literal parentheses

Unescaped parentheses are treated as prompt syntax. If you want actual parentheses in the text, escape them with backslashes.

colored pencil \(medium\)

portrait \(realistic\) (high quality)1.2

A bear \(with razor-sharp teeth\) in a forest

Use unescaped parentheses only when you mean grouping or weighting.