Recent advances in diffusion-based text-to-image (T2I) models have led to remarkable success in generating high-quality images from textual prompts. However, ensuring accurate alignment between the text and the generated image remains a significant challenge for state-of-the-art diffusion models. To address this, existing studies often employ reinforcement learning with human feedback (RLHF) to align T2I outputs with human preferences. These methods, however, either rely directly on paired image preference data or require a learned reward function, both of which depend heavily on costly, high-quality human annotations and thus face scalability limitations. In this work, we introduce \textbf{Text Preference Optimization (TPO)}, a novel framework that enables ``free-lunc'' alignment of T2I models, achieving alignment without the need for paired image preference data. TPO works by training the model to prefer matched prompts over mismatched prompts, which are constructed by perturbing original captions using a large language model (LLM). Our framework is general and compatible with existing preference-based algorithms. We extend both DPO and KTO to our setting, resulting in \textbf{TDPO} and \textbf{TKTO}. Quantitative and qualitative evaluations across multiple benchmarks show that our methods consistently outperform their original counterparts, yielding superior human preference scores and better text-to-image alignment. Open-sourced code can be found at \url{https://github.com/DSL-Lab/T2I-Free-Lunch-Alignment}.
- Release Paper
- Release code
- Upload pretrained models
- Add usage scripts
git clone https://github.com/DSL-Lab/T2I-Free-Lunch-Alignment.git
cd T2I-Free-Lunch-Alignment
pip install -r requirements.txt