• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

When users prompt a diffusion model to render specific text like “Made by Lakme” on an image, the output frequently contains spelling errors (“Maed by Lakm3”), wrong characters, or illegible text. This is unacceptable for commercial marketing where brand names and taglines must be exact.

Core Idea

The text rendering problem isn’t one issue — it’s three separate problems occurring at three different layers of the generation pipeline. Each layer needs its own solution.

How It Works

Problem 1: Character-Blind Text Encoder (CLIP)

When you write “Made by Lakme”, the text encoder converts it to a vector. CLIP was trained on image-text pairs to understand semantic meaning — “Lakme” means a cosmetics brand concept. CLIP has no concept of the specific letters L-a-k-m-e.

"made by lakme" → [concept: luxury brand, cosmetics, ...]
"MAde By LAKME" → [same concept, no difference]

Problem 2: Semantic Drift in Attention

During image generation, the model’s attention mechanism prioritizes the concept of “Lakme” (brand, luxury, glossy) over the letter shapes (L, a, k, m, e). The word “GOLD” literally gets rendered as golden shimmer instead of the letters G-O-L-D because the semantic concept overrides the glyph information.

Problem 3: VAE Stroke Destruction

Diffusion models work in a compressed “latent space” created by a VAE (Variational Autoencoder). The VAE compresses 1024x1024 pixels into 128x128 latent representations. During this compression, fine details like thin letter strokes get blurred or lost entirely. Standard 4-channel VAEs (used in SDXL) don’t have enough capacity to preserve high-frequency text details.

Key Properties

  • Multi-layer problem: Character-blind encoder + semantic drift + VAE compression = three failure points
  • Training data scarcity: Diffusion models trained on LAION where most images have no text
  • Industry-wide: All major models (SDXL, Midjourney, DALL-E) struggle with this
  • Solution requires multiple fixes: No single approach solves all three layers

Edge Cases & Gotchas

  • Short words (2-3 letters) often render correctly; longer brand names fail more
  • Numbers fail more than letters (0 vs O confusion)
  • Multi-language text (Hindi + English) is even harder
  • Sans-serif fonts render better than serif (fewer fine details to lose)