2026

With recent advances in diffusion models, text-to-image (T2I) generation has achieved remarkable progress, producing high-quality images from simple text prompts. However, as these models have become more expressive, concerns regarding the generation of unsafe or inappropriate content have grown. To address this issue, we propose the Safety-Adjustable Framework for Ethics (Safe), a novel training-free, plug-and-play prompt optimization framework. Leveraging the reasoning capabilities of large language models (LLMs), Safe optimizes prompts to meet concept-specific safety requirements while preserving their original semantics. The framework operates in three stages: (1) generating an image from the original prompt using a pretrained T2I model, (2) analyzing the generated image with a vision-language model (VLM), and (3) conducting DAG-based reasoning over both the prompt and the image description to produce refined prompt. In addition, Safe uses a search module to incorporate external knowledge such as cultural norms and legal constraints, enabling adaptation to diverse user contexts. Extensive experiments demonstrate that Safe effectively complements existing safety methods and achieves strong performance in user-centric safety alignment.