Writing / AI

The negative prompt that erased the wound

I needed reference imagery for a clinical documentation tool, and every model I ran handed back something sanitised. It looked like refusal. It was four words in a config file I had copied without reading.

I spend a fair amount of time in medical and clinical territory - 3D anatomy work, a wound documentation concept, tools for clinicians who need to record what they are seeing rather than decide what it means. For one of those I needed generated reference imagery: a venous leg ulcer, a diabetic foot, a pressure injury. Not for diagnosis. For design. You cannot lay out a documentation interface around a photograph you do not have.

So I ran it through my own image studio, and the results were consistently, strangely wrong. Technically excellent. Beautifully lit. Clean backdrop, retouched skin, the whole thing composed like a product shot. Where the pathology should have been there was something polite and vague.

My first thought was the reflex everybody has now: the model is aligned into uselessness. It has been trained not to render this.

It had not. I had told it not to.

Four words, copied from everywhere

Every image model in my setup carried a baseline negative prompt - the boilerplate that gets pasted into every workflow on the internet. Some version of: deformed, ugly, bad hands, extra limbs, blurry, watermark, cartoon. All three of my models carried deformed. One also carried ugly.

Those words are in there for a real reason. Diffusion models are famously bad at hands, and telling the sampler to steer away from deformity is how a generation of people stopped generating six-fingered portraits. In general-purpose work it is close to free.

In clinical work it is the whole subject. "Deformed" does not mean "badly drawn hand" to a sampler. It means anatomical abnormality, and anatomical abnormality is precisely the thing a wound photograph exists to record. I had built a careful pipeline whose first instruction was to avoid the finding.

It reads as "the model is censored" when it is really your own config fighting you.

Once I read the rest of the boilerplate with that lens, more of it fell over:

Term in the default negativeWhy it is thereWhat it does to a clinical frame
deformedStop mangled limbs and handsSuppresses the abnormality itself
uglyPush output toward attractivePushes away from disease presentation
beauty retouching, smooth skinFlattering portraitsErases periwound signs: mottling, staining, atrophy
dramatic lighting, vignetteMake it look cinematicProduces a product shot, not a ward photograph
blurry, watermark, cartoonMedium and quality controlGenuinely fine, keep these

Replace, do not append

The fix shipped as a Clinical mode toggle in the studio, and the single most important design decision in it is that the clinical negative prompt replaces the model's baseline rather than adding to it. Appending would have been the obvious, tidy implementation and it would have achieved nothing: the suppressing terms are still in the string, still steering. You cannot cancel a negative prompt with more prompt.

Alongside it goes a positive prefix that describes a camera rather than a subject: clinical photograph, medical documentation, even diffuse lighting, neutral background, sharp focus, true-to-life colour. That prefix is inserted after the model's own prefix, not instead of it, because some model families collapse entirely without their native quality tokens.

The A/B on the same prompt, a venous leg ulcer, was not subtle. Toggle off: a dissection specimen on a clean backdrop, dramatic light, airbrushed skin. Toggle on: a patient on white linen, ward equipment blurred behind, and the periwound findings actually present - the brown staining and the thin mottled skin that the old negatives had been quietly deleting.

The bug inside the fix, for anyone building something similar: my prompt string was assembled from prefix plus user text early in the generate function, so mutating the prompt variable afterwards did nothing at all. Silent, and it cost me a round of confused testing. Build the head first, then read from it.

Two prompt rules I only learned by failing

Negations do not work. I wrote "no exposed bone" into a prompt, and got back a full anatomical dissection with exposed bone. The model does not process the "no", it processes the noun. Anything you want absent goes in the negative prompt, never in the positive one. This is well known and I still did it, because writing instructions in English is such a natural thing to do that you forget you are not talking to a reader.

Pathophysiology wording triggers illustration mode. "Full-thickness loss with visible subcutaneous fat" is correct clinical language and it produces a textbook cutaway every time, because that phrasing overwhelmingly appears in the training data next to diagrams. The wording that produces a photograph describes what the camera sees, in order: framing, site, wound bed, edges, surrounding skin, then the setting. Same information, completely different visual register.

The honest ceiling

I want to be straight about where this ends, because "I fixed the prompt and it worked" is not what happened.

After the fix, the context is convincing: framing, ward setting, lighting, skin texture, anatomy. The pathology is not. Yellow slough renders as literal glossy yellow goo - on one diabetic foot test it smeared the same yellow across unrelated toenails. Severity comes out wildly exaggerated. The models simply have very little real clinical photography behind them.

I tried to close that gap properly and trained a wound LoRA on 188 hand-curated images. It learned the context beautifully and the pathology not at all: every wound came out enormous and lurid, at full strength and at half. The cause was not the training run, it was the source. Public image libraries mostly hold wounds severe enough that somebody thought to photograph and upload them, so "wound" was learned as "large and dramatic". No number of epochs fixes a skew in what you collected.

Which points at the real answer for anything that has to look genuinely clinical: stop generating from text. Anchor on a real photograph and edit it - inpaint with a smart selection, run image-to-image from a reference, condition on an actual case. Text-to-image is a good way to build a plausible scene and a bad way to invent a finding.

Why I keep telling this story

Because the failure was not technical, it was a default carrying a worldview. Someone, reasonably, encoded "good image" as "attractive, unblemished, well lit" and that definition propagated into thousands of configs including mine. It is invisible until you work in a domain where it is exactly backwards. Medical imagery is one. Accessibility work is full of others - the tidy default that assumes a reader who does not need help.

So the habit I have now, whenever I plug a general-purpose model into a specialised job: read the defaults before the docs, and ask what each one is silently optimising away. And when a model seems to be refusing you, check your own configuration before you blame its training. Most of the time the censor is sitting in your config file, wearing four words you copied and never read.

Related work
Wound documentation - a clinical design demo
See the demo →