cs.CVAug 22, 2026

GuardPaint:SpeculativeSafetyDecodingforText-to-ImageGeneration

Authors: Shreyash Dhoot, Paras Dhiman, Arsh Abbas Naqvi, Aranbi Dutta, Aman Chadha, Vinija Jain, Amitava Das

Organizations: Pragya Lab, BITS Pilani Goa, India · Apple, USA · Meta, USA

Abstract

Text-to-image (T2I) diffusion models offer powerful visual generation, but their controllability creates a critical safety challenge: adversarial prompts can steer the denoising trajectory toward policy-violating content such as explicit nudity or graphic violence. Existing safeguards mostly act before generation through prompt filtering or after generation through image classification, leaving the diffusion process itself unguarded and often yielding only refusal rather than safe visual repair. We introduce GuardPaint, a speculative decoding framework for safe T2I generation that intervenes inside the diffusion trajectory without modifying the base model. A lightweight auditor monitors intermediate images, localizes unsafe regions, and triggers surgical inpainting repair only where needed. Candidate repairs are generated by a policy-aligned inpainter and selected through a guarded tournament that accepts edits only when they improve policy compliance while preserving prompt fidelity and perceptual quality. Across five jailbreak families SneakPrompt, MMA, PGJ, DACA, and RABell and UNet/flow-matching models including SD1.5, SDXL, SD3.5, and FLUX.1-dev. GuardPaint reduces attack success and harmful generations with minimal degradation to image quality, prompt fidelity, and benign behavior. Content warning: This paper contains examples involving nudity and violence that some readers may find disturbing, distressing, or offensive.

Explore similar work

CardsList
  1. Introspective Attention Modulation for Safe Text-to-Image Generation

    Jul 16, 2026Basim Azam, Hossein Rahmani, Naveed AkhtarDiffusion TransformerT2I Generation

  2. Dynamic Defense Profiling Enables Cognitive Jailbreak of Text-to-Image Models

    Jul 20, 2026Dongdong Yang, Deyue Zhang, Zhao Liu +5Adversarial Prompt GenerationAdversarial Examples