Abstract
Controlling the color distribution in text-to-image diffusion models remains a significant challenge for artists and designers. We present the Palette-Adapter, a lightweight module that enables precise color control using simple palettes. By treating palettes as sparse 3D histograms in HSV space and introducing scalar parameters for entropy and adherence, our method achieves a superior balance between following a user's color scheme and maintaining high image quality.
Introduction
While modern text-to-image models like SDXL produce high-quality visuals, they often lack the granular control required for professional workflows, such as adhering to a specific brand identity or mood defined by a color palette. Existing methods often require complex spatial maps or suffer from instability where minor palette changes lead to unpredictable image shifts. The Palette-Adapter addresses these issues by providing a stable, intuitive interface for palette-based image generation.
Methodology: Palettes as Sparse Histograms
The core innovation of the Palette-Adapter is the treatment of a color palette—typically a small set of 3–10 colors—as a "degenerate" 3D histogram in HSV (Hue, Saturation, Value) space. This formulation allows the model to learn from both sparse palettes and full-image color distributions within a unified mathematical framework.
The Critical Block Strategy
Through extensive ablation studies, we identified that color control is most effective when applied to a specific part of the U-Net architecture: the up_blocks.0.attentions.1 block. By conditioning only this "critical block," the Palette-Adapter avoids structural artifacts and prevents the model from overfitting to the color constraints.
Scalar Control Parameters
To provide users with fine-grained control, we introduce two primary scalar parameters:
- Histogram Entropy: This "knob" controls color complexity. Low entropy results in "binned" or posterized looks, while high entropy allows for rich gradients and naturalistic shading.
- Palette-to-Histogram Distance: This controls how strictly the generated image must adhere to the provided palette.
Negative Palettes
Similar to negative text prompts, the Palette-Adapter supports "negative palettes." This feature allows users to explicitly suppress unwanted colors, ensuring that the AI does not introduce clashing hues that might otherwise appear due to semantic biases (e.g., preventing a "forest" prompt from automatically including green).
Data and Training
Standard datasets like LAION-Art are often biased toward natural, common colors. To improve performance on rare or highly saturated hues, we curated a balanced training set of 2.4 million images. This includes 2 million images from LAION-Art and 400,000 additional images sampled from LAION-2B-en specifically for their "rare" histogram bin values.
Results and Discussion
The Palette-Adapter was evaluated against baselines such as T2I-Adapter and FLUX IC. In user studies, our method achieved the highest harmonic mean (3.647) between palette adherence and image quality.
A key insight is the role of Earth Mover’s Distance (EMD). While a lower EMD indicates closer palette adherence, a "perfect" 0 EMD often results in poor image quality. The Palette-Adapter aims for a "practical" EMD that respects the palette while allowing sufficient variation for high-quality rendering. Furthermore, the model exhibits "semantic awareness," adapting the content to the colors—for example, choosing a Golden Retriever when given a golden palette for a "dog" prompt.
Conclusion and Future Work
The Palette-Adapter provides a robust solution for palette-based image generation. Future work will explore "early decoding" to automatically detect and suppress color deviations, reducing the need for manual negative palettes, and further addressing biases toward muted tones in extremely saturated color spaces.
Summary updated