Beautiful Images, Toxic Words: Understanding and Addressing Offensive Text in Generated Images
Aditya KumarTom BlanchardAdam DziedzicFranziska Boenisch
Aditya Kumar
Tom Blanchard
Adam Dziedzic
Franziska Boenisch
+4
This paper identifies a new threat in text-to-image diffusion models: generation of not-safe-for-work text embedded within otherwise realistic images, such as insults, slurs, and sexually explicit terms. All state-of-the-art models examined (e.g., SD3, SDXL, Flux, DeepFloyd IF) are shown to be vulnerable, and existing mitigations effective for visual content fail here while substantially degrading benign text generation. As a first step, the authors propose fine-tuning only the text-generation layers on a dataset pairing each harmful prompt with an image containing the NSFW term and a nearly identical benign variant, teaching the model to avoid harmful text while preserving benign content and image quality. They also release ToxicBench, an open benchmark with the fine-tuning dataset, harmful prompts, new evaluation metrics, and a pipeline assessing NSFW-ness, text quality, and image quality.