arXiv · 2611.38550
Rewriting Without a Rewriter: Distilling Prompt Enhancement into the Text Encoder
Abstract
Rewriting image prompts with LLMs improves the semantic alignment of text-to-image (T2I) models, especially when the image's content needs to be inferred. However, the extra LLM call is expensive at deployment. We introduce Subtext, which distills the rewriter into the T2I model's text encoder: with the image generator frozen, the encoder is finetuned so that the plain prompt induces the denoising trajectory of the rewritten prompt. Velocity matching, the standard distillation objective in this setting, recovers the rewriter's gain on prompts that only need more detail (elaboration prompts), but struggles to bridge the gap on prompts that require reasoning. We therefore add a set-matching loss that pulls the encoder's padding outputs toward the words the rewriter adds. On SD3.5-Medium, the finetuned encoder matches the rewriter on eight elaboration benchmarks, and on five reasoning benchmarks it recovers twice the share that velocity-only distillation recovers, without additional deployment-time compute. Our encoder is also complementary to rewriting: when deployment-time compute permits an LLM rewrite, feeding it to our encoder outperforms feeding it to the base model. Because only the encoder changes, it transfers without retraining to larger models that share the same base encoder (SD3.5-Large, FLUX.1-schnell), keeping a similar share of the rewriter's reasoning gain. Our recipe outperforms velocity-only and generator-side distillation at the same parameter count, and matches variants with twice the trainable parameters and 1.5x the training compute. The recipe also ports to generators with LLM text encoders: on FLUX.2-klein and Qwen-Image-2.1, it significantly improves both prompt types and again beats velocity-only distillation on reasoning. Gains are measured in-domain and out-of-domain on 14 benchmarks, using a strong validated judge, with significance levels reported.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Mohammed Abdulrahman, Pascal Poupart, Suraj Kothawade. 2026-11-28. Rewriting Without a Rewriter: Distilling Prompt Enhancement into the Text Encoder. https://arxiv.science/abs/2611.38550
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.