Addaly is in open beta. Things will change, and AI answers can be wrong — check anything that matters.

Making Things With AI

Images, video, voice and music — how they work, where they break, who owns them.

Lesson 20 of 848 min

Counting, and the objects that swap their attributes

Ask for five and get four, or six

Request five apples on a plate and count what comes back. One, two and three are usually right. Four is usually right. Five is a coin toss. Beyond six, the model produces "a lot of apples" and the exact number is essentially random.

This is not a shortage of training images of five apples. It is that nothing in the generation process counts.

How often the count is right05010018Objects requestedGenerations with the right number, %—— Plain prompt, one hundred seeds eachNothing in the pipeline counts. Each latent cell settles into something plausible for itsneighbourhood and no register anywhere holds three placed, two to go. Past four the number is close towhatever the local dynamics produced, and repeating it in the prompt does not touch it.
How often the count is right05010018Across: Objects requestedUp: Generations with the right number, %—— Plain prompt, one hundred seeds eachNothing in the pipeline counts. Each latent cellsettles into something plausible for itsneighbourhood and no register anywhere holds threeplaced, two to go. Past four the number is close towhatever the local dynamics produced, and repeatingit in the prompt does not touch it.

Recall how the image forms. Each cell of the latent grid attends to the prompt and settles into something plausible for its neighbourhood. A cell surrounded by apple-ish cells becomes more apple. There is no global register holding "we have placed three so far, two to go". The number that emerges is whatever the local dynamics produced, and the prompt influences it only as a general pressure toward apple-density.

Models trained on machine-written captions do better, because their captions actually said "five apples" while alt text rarely did. Better is not solved. Published evaluations of current models still show accuracy falling off sharply past four objects, and the same model that renders skin convincingly will hand you six fingers on a hand it drew perfectly otherwise.

The same mechanism, different symptom

Attribute binding is the counting failure wearing another coat. a woman in a green coat next to a man in a red coat returns, with real frequency, both coats red, both green, or the colours swapped.

The token vectors for green, coat, red and man are all available everywhere. A latent region turning into a coat attends to coat strongly, and then must pick a colour from two candidates neither of which is bound to it. Whichever has slightly higher affinity in that region wins, and the winner is not stable across seeds.

Failure gets worse as the number of attributed objects rises, for the same reason counting does, and it gets worse when the objects are visually similar. Two coats compete far more than a coat and a teapot.

What actually fixes it

In rough order of effort:

  1. Separate clauses and full stops. On a syntax-reading model this genuinely helps: A man wears a red coat. A woman wears a green coat. gives the encoder a structure to bind within.
  2. Regional prompting. Condition the left region on one prompt and the right region on another. Now nothing competes, because the colour words are not present in the other region's conditioning at all. Free in ComfyUI and available as extensions in most WebUIs.
  3. Generate separately and composite. Two images, one subject each, combined in GIMP, Krita or Photopea. For a count, this is often the only reliable route: generate one apple, duplicate it five times, vary the rotation and lighting slightly.
  4. Inpaint the count. Generate four apples, mask an empty area, inpaint a fifth. The model only has to add one object, which it can do.

What does not work: repeating the number, weighting the number, writing exactly five, 5 apples (five:1.5), or putting four apples, six apples in the negative prompt. All of these are attempts to argue with a machine that has no counter, and every one of them is a thing people spend an afternoon trying.

The professional consequence

If a job specifies a count — three product variants in a row, a family of four, five icons — do not plan to prompt your way there. Plan to generate the elements and assemble them. This is not a workaround forced on you by an immature technology; it is how commercial illustration has always been produced. The generated element is a component, and the composition is your work.

There is an honest ceiling here worth stating. Some models have improved counting markedly by training on synthetic images with programmatically correct captions. It is a genuine gain and it is bounded: the improvement is on the kinds of arrangement the synthetic data contained. A count in an unusual arrangement — five people around a table, three specific tools in a row — still fails, because the fix was more training data of a certain shape rather than a mechanism for counting. Watch for this pattern generally. A capability that arrives through targeted data works exactly as far as the data went.

The one thing to keep

Nothing in the architecture ties an adjective to a noun or enforces a quantity, so counts and attribute assignments are emergent rather than guaranteed and degrade sharply above three or four objects.

Before you move on

A prompt asking for six identical bottles reliably returns five or seven, on every seed and every model tried. Which response follows from the mechanism?

Pick the one you would defend. Nobody sees your answer.

No ads. No data sale. No public scores on people. Ever.

© 2026 Addaly

Counting, and the objects that swap their attributes · Making Things With AI · Addaly