Saying is doing
In How to Do Things with Words (1962), the philosopher J. L. Austin pointed out that many utterances are not statements but actions: promising, ordering, naming, apologising. John Searle later classified these speech acts, distinguishing assertives that describe how things are from directives that try to get someone to do something.
Prompts are speech acts too, and which kind you use matters. Classic diffusion models were trained on captions, which are descriptions, so they respond best to assertive language that describes an image. Newer image models built on conversational language models are trained to follow instructions, so they understand directives, especially for editing: 'keep the face, change the coat'. Knowing which kind of speech act your tool expects removes a lot of confusion.
Kinds of prompt speech acts
'A red door in a white wall, morning light.' A caption for an image that doesn't exist yet.
'Create an image of a red door.' A directive asking the system to act.
'Make the door red; keep everything else.' A directive about an existing image.
'What would this look like at night?' Some conversational tools answer with a new image.
Which models expect which
Respond to descriptions; words like 'create', 'please' or 'an image of' add little or noise.
Understand directives and context from a conversation; can follow multi-step requests.
Need clear targets and constraints: what to change and what to preserve.
Some systems turn your instruction into a description before generating; read the rewritten version if shown.
Felicity conditions
An edit needs a definite referent: 'the coat', not 'it'.
Ask for changes the image can support: removing a person behind a pillar is easier than revealing a hidden face.
State what must stay the same, or the system may change everything.
Several edits in one sentence compete; give them one at a time.
Writing better acts
For a new image, write the caption you want it to deserve.
For changes, use short imperatives with a preservation clause.
'Please' and 'could you' don't hurt conversational models but add nothing for caption-trained ones.
An instruction wrapped around a good description works well in conversational tools: 'Create: [description]'.
The words to describe it
Precise words for the qualities above. Combine a few of them instead of naming the style or artist alone.
- speech act
- assertive description
- directive instruction
- edit instruction
- preservation clause
- felicity conditions
- clear referent
- one edit per turn
- instruction-tuned model
- prompt rewriting
An edit as a well-formed directive: 'Change only the coat to a dark green wool coat. Keep the face, hair, pose, background and light direction exactly the same.'
How to put it into words
- Ask whether you are describing a new image or changing an existing one.
- For new images, write a description; for edits, an instruction with what to keep.
- Give one edit per turn.
Where we usually get it wrong
Writing conversational requests to a caption-trained model ('Hey, can you please make me a really nice picture of...') and descriptions to an editor ('a red coat') without saying what to keep. Each model reads the kind of language it was trained on.
Take one image you've generated. Write three edits as separate instructions, each with a preservation clause, and apply them one at a time. Then try all three in one sentence and compare what drifted.
Sources and further reading
- J. L. Austin, How to Do Things with Words (1962).
- John R. Searle, Speech Acts (1969).
- Brooks, Holynski and Efros, 'InstructPix2Pix: Learning to Follow Image Editing Instructions' (CVPR 2023).