Abstract
Controllable image generation aims to incorporate dense spatial constraints—such as Canny edges, depth maps, or human poses—into text-to-image diffusion models. However, existing fine-tuning methods often struggle with "cycle consistency," where the generated output fails to align precisely with the input condition. We present Condition Preference Optimization (CPO), a novel framework that redefines preference learning by focusing on the conditions themselves rather than the generated images. By comparing a ground-truth condition against a perturbed one for a fixed image, CPO eliminates confounding factors like image style and quality, leading to more stable training and superior spatial alignment. Our results demonstrate that CPO significantly outperforms state-of-the-art models like ControlNet++ while requiring 20x less computational overhead for dataset curation.
1. Introduction
The evolution of text-to-image (T2I) models has enabled the synthesis of high-quality imagery from simple natural language prompts. Despite this progress, text prompts remain inherently "sparse," often failing to convey precise spatial layouts or complex structural requirements. To bridge this gap, researchers have introduced "dense" control signals, such as edge maps or human skeletons, through architectures like ControlNet.
The primary challenge in this domain is ensuring "cycle consistency"—the degree to which a generated image $I$ adheres to the input condition $c$. Previous attempts to optimize this consistency, such as Direct Preference Optimization (DPO), have faced significant hurdles. These include the prohibitive memory costs of back-propagating through iterative diffusion steps and the presence of "noisy preferences," where a model might prefer an image for its aesthetic quality rather than its structural alignment.
2. Condition Preference Optimization
CPO introduces a paradigm shift in how we approach preference learning for controllable generation. The central insight is that the alignment between an image $I$ and a condition $c$ is bi-directional. While traditional DPO compares two different images ($I^w, I^l$) against a single condition $c$, CPO compares two different conditions ($c^w, c^l$) against a single fixed image $I$.
2.1 The CPO Workflow
The CPO training process involves three main components:
- Dataset Curation: For a given image, a "winning" condition $c^w$ (the ground truth) and a "losing" condition $c^l$ (a perturbed version or one extracted from a poorly aligned generation) are identified.
- Contrastive Loss: The model is trained to maximize the likelihood of the winning condition over the losing one. By holding the image constant, the model is forced to ignore irrelevant "nuisance variables" such as lighting, texture, or color, and focus exclusively on spatial alignment.
- Optimization Stability: The authors utilize a low-variance training objective that incorporates a triplet margin ($m$) to prevent overfitting and a pre-training regularization term ($\lambda L_{pretrain}$) to maintain the model's general generative capabilities.
3. Efficiency and Datasets
One of the most significant advantages of CPO is its computational efficiency. Traditional DPO-based methods require generating approximately 20 images per prompt to identify a suitable win/loss pair. In contrast, CPO requires only a single image generation, resulting in a 20x reduction in the resources needed for dataset curation.
The researchers have curated the CPO Dataset, spanning several domains:
- Segmentation: Utilizing ADE20K (20K examples) and COCO-Stuff (118K examples).
- Human Pose: Incorporating COCO-Pose (60K examples) and HumanArt.
- Structure/Edges: Leveraging MultiGen-20M (2.8M examples each for Canny, HED, Lineart, and Depth maps).
4. Key Insights
CPO offers several theoretical and practical advantages over existing baselines:
- Nuisance Variable Elimination: By performing preference learning at the condition level, the model is shielded from the aesthetic "noise" (color, style, quality) that often misleads image-based preference methods.
- Theoretical Stability: Mathematical analysis indicates that CPO possesses a lower contrastive loss variance than DPO, providing a cleaner training signal.
- All-Timestep Optimization: Unlike models like ControlNet++, which often rely on single-step approximations effective only at low-noise timesteps ($t < 200$), CPO can be applied across the entire diffusion process. This allows the model to learn structural alignment even during the early, high-noise stages of generation.
5. Results and Evaluation
CPO achieves state-of-the-art performance across a wide array of control modalities. Quantitative evaluations show:
- Human Pose: A massive 70–80% reduction in error rate compared to ControlNet++.
- Segmentation: Over 10% error rate reduction on ADE20K and COCO-Stuff.
- Edges & Depth: Consistent 2–5% improvements across Canny, HED, and Depth tasks.
Qualitatively, CPO-trained models demonstrate superior precision in placing fine details, such as the exact edges of architectural elements or the specific positioning of furniture, where competing models like ControlAR often introduce artifacts or ignore the prompt. Human evaluators also preferred CPO's alignment in HED and Depth tasks by a significant margin.
6. Conclusion and Future Work
CPO represents a significant step forward in controllable image generation, offering a more stable, efficient, and precise alternative to existing fine-tuning frameworks. While currently implemented on Stable Diffusion v1.5 at $512 \times 512$ resolution, future work will focus on scaling CPO to higher-resolution models like SDXL or FLUX. Additionally, exploring the application of condition-preference logic to other RLHF variants, such as Kahneman-Tversky Optimization (KTO), remains a promising avenue for research.
Summary updated