Prompting

How to Generate Readable Text in Stable Diffusion Images

PhoneDiffusion
How to Generate Readable Text in Stable Diffusion Images

Prompts

To generate readable text in Stable Diffusion images, ask for one to three short words, write them exactly as in ‘a sign that says OPEN’, give them a large plain surface, and generate several seeds. The SD 1.5 and SDXL model cards state they cannot render legible text, so for wording that must be exact, inpaint the text area, use a typography-focused model such as Stable Diffusion 3.5, or add the lettering afterward in a photo or design editor.

Can Stable Diffusion generate readable text? The short answer

Sometimes, for a word or two, but not reliably. The official model cards for Stable Diffusion 1.5 and SDXL base 1.0 both list ‘The model cannot render legible text’ among their limitations. Short words on a big sign can come out right after a few tries; long phrases, small print, and exact logos usually come out garbled, misspelled, or as letter-like shapes.

So pick the route by how exact the text must be. For a decorative word, prompt for it and try several seeds. For a headline that must be correct, repair the text area with inpainting or use a model built for typography, such as Stable Diffusion 3.5. For a logo, label, price, or any message that must be spelled perfectly, generate the image with a blank area and add the lettering yourself.

Why Stable Diffusion text comes out garbled

The model reads your prompt through a text encoder: SD 1.5 uses CLIP ViT-L/14, and SDXL uses OpenCLIP-ViT/G plus CLIP-ViT/L. A Google Research study of text rendering, Liu et al. (2022), lists Stable Diffusion among popular models whose text encoders are character-blind: they see words or word pieces, not individual letters, so the model gets little signal about how a word is spelled. The same study found that character-aware encoders spell much better in generated images.

Small letters are hit hardest. Stable Diffusion generates a compressed latent image and decodes it at the end, and both model cards note that this autoencoding step is lossy. Letters are fine, high-contrast detail, so tiny text is the first thing to smear. The SD 1.5 card also says the model was trained mainly with English captions and works less well in other languages.

Stable Diffusion 3 changed both parts. Its paper credits a new architecture, in which image and text tokens exchange information in both directions, with improved typography, and SD3 adds a large T5 text encoder next to two CLIP encoders. In the paper's human evaluation, removing T5 hurt written text more than any other category, and the effect was largest for longer spelled text.

Prompt tips for readable text in SD 1.5 and SDXL

Keep the wording short. One to three short words give the model far fewer letters to get wrong than a sentence. Write the exact wording in the prompt the way maintainers do in their own examples, such as Diffusers' ‘a cat holding a sign that says hello world’, and keep the spelling, capitalization, and spacing the same across attempts.

Give the text a large, plain surface that faces the camera: a shop sign, a poster, a banner, a cake top, or a T-shirt front. Describe simple lettering, such as ‘large bold white capital letters on a plain red sign’, and leave out busy patterns, curved surfaces, and steep angles behind the words. The bigger the letters are in the frame, the more pixels each one gets.

Then treat text as a seed hunt. Fix the prompt, size, and settings and generate several variations; keep the one where the word is closest, and save its seed. More steps or a higher CFG do not guarantee correct spelling. If a word is wrong in every attempt, a different short word or a later repair step usually saves more time than rewriting the whole prompt.

PhoneDiffusion generates on-device on iPhone or iPad, with optional cloud models. Download on the App Store →

Use a model built for typography: Stable Diffusion 3 and 3.5

If text inside the image matters, the model matters more than the prompt. The Stable Diffusion 3.5 Large model card describes improved typography and complex prompt understanding, and lists three fixed text encoders: OpenCLIP-ViT/G, CLIP-ViT/L, and T5-xxl. Diffusers runs SD3 and SD3.5 with the same pipeline, and its examples use prompts such as ‘a cat holding a sign that says hello world’.

The tradeoff is memory. Diffusers notes that the 4.7B-parameter T5-XXL encoder makes SD3 hard to run on GPUs with less than 24GB of VRAM, and it documents dropping T5 to save memory with only a slight overall loss. For text-heavy prompts that tradeoff is not neutral: the SD3 paper found written text is exactly where T5 helps most. Check the license too; SD3.5 Large is released under the Stability Community License.

Improved typography still means checking every letter. Treat a typography-focused model as a better starting point, not a guarantee, and proofread the result at full size before you use it.

Fix the text after generation: inpainting and ControlNet

If the image is right and only the word is wrong, repaint just the text area. In inpainting, the mask's white area is regenerated from the prompt and the black area is kept, so mask the sign with a little room around it and describe only the replacement, such as ‘a red sign that says OPEN in large white letters’. Diffusers explains that strength sets how far the masked area moves away from the original. Try several attempts at that one area instead of regenerating the whole picture.

On a desktop setup, ControlNet can lock the letter shapes. Diffusers describes ControlNet as steering a model with a structural control image, such as canny edges or a depth map, while you keep the text prompt. Typing the exact word in black on white, turning it into an edge or depth control image, and generating with that control gives the model the letter outlines instead of asking it to spell. The controlnet_conditioning_scale setting decides how strongly the control steers the image, so letters can still drift at low values.

The reliable route: add the lettering yourself

For a logo, product label, price, date, or any message that must be spelled correctly, do not ask the diffusion model for the letters at all. Prompt for the scene with an empty area instead, such as ‘a blank wooden sign’ or ‘an empty poster on a brick wall’, and add the text in an editor where the font and spelling are under your control. The same goes for packaging and labels in product photography: generate the scene, then add or keep the real lettering.

On iPhone, Photos can do a simple version. Apple's Markup steps are: open the photo, tap Edit, tap Markup, tap the Add button to add text, and use the format controls to change the font, size, alignment, and color. A design app gives more control over typefaces and layout. Either way, the words stay exactly as typed.

PhoneDiffusion availability and article scope

PhoneDiffusion runs curated Core ML model packs on supported iPhone and iPad devices with iOS 17 or later. Its generation packs include Stable Diffusion 1.5 and SDXL models, which share the text limitation described on their model cards. The app has no Stable Diffusion 3 or 3.5 pack, no ControlNet, no text or typography tool, and no general importer for arbitrary checkpoints or LoRAs. Its optional cloud models, on paid monthly or yearly plans, include non-Stable Diffusion models such as Ideogram, GPT Image, Nano Banana, and Recraft; they generate online from your prompt (sent to PhoneDiffusion’s AI provider) and are a separate route to try for lettering, without a guarantee of exact spelling.

What it does offer for text is advice and repair. After a text-to-image result, tapping the thumbs-down (‘Needs improvement’) button lists ‘Text is misspelled or unreadable’, with tips that match this guide: keep the wording short, use large simple lettering on a plain surface, and add exact text after exporting. Inpainting is available as a separate editing tool, with a brush mask and a Replacement strength control, for repainting just the sign area. Save the image to Photos and use Markup, or another editor, for lettering that must be exact.

The SD3, SD3.5, and ControlNet steps above describe desktop and server tools, not features inside PhoneDiffusion.

Field notes

  • The SD 1.5 and SDXL model cards say they cannot render legible text; short words on large signs are the best case, not a guarantee.
  • Text breaks because the text encoder is character-blind and fine letter detail is lost in the lossy latent autoencoder.
  • Stable Diffusion 3 and 3.5 improve typography, and the T5 text encoder matters most for written text.
  • For exact wording, repaint the text area with inpainting or add the lettering afterward in an editor.

Try it on your phone

  1. Ask for one to three short words on a large, plain, camera-facing surface, written exactly as in ‘a sign that says OPEN’.
  2. Fix the prompt and settings, generate several seeds, and keep the closest result.
  3. If only the word is wrong, mask the text area and inpaint it with the exact wording.
  4. If the wording must be perfect, generate a blank sign or poster and add the text in Photos Markup or a design app.
  5. Proofread every letter at full size before you share or print the image.

Sources and verification

Primary and maintainer documentation checked for this guide. Product-specific details were reviewed against the current PhoneDiffusion scope.