Traversing principal latent directions in pretrained VAEs reveals an opponent-color plane and brightness axis that emerge spontaneously from natural image statistics.
FLUX.1-dev (16 latent channels): Sweeping principal directions spans an orthogonal opponent-color plane (ch2 across columns, ch3 across rows) and independent brightness control while preserving image structure.
FLUX.2-dev (32 latent channels): Higher dimensional latent spaces preserve the identical canonical chromatic organization, demonstrating model-agnostic universality across architectures.
Stable Diffusion 3 (16 latent channels): Leading latent components isolate opponent-color transitions across natural scenes without affecting spatial geometry.
SDXL (4 latent channels): In compact 4-channel latents, color information aligns directly with dominant channels, confirming that efficient image compression inherently isolates chromaticity.
Building on the characterization of the color basis, we propose three generation-time applications in text-to-image diffusion models.
Exploits the discovered orthogonal directions to steer generation towards exact numerical colors (HEX, RGB, CIELAB). Replaces the numerical code with an ISCC-NBS Level 2 proxy color name to initiate diffusion in the target chromatic basin. At a calibrated gate step s, predicts clean latent ẑ0, segments the object via SAM, and measures the CIELAB color. A lightweight ResMLP predicts the displacement along the color basis (u1, u2, u3), injected inside the object mask with a linearly decaying schedule.
Continuously modulates the chroma of the generated scene or specific objects without altering semantic structure or hue. Preserves lightness Li and hue angle while scaling chroma to (Li, (1 − α)ai, (1 − α)bi) for reduction factor α ∈ [0, 1]. Evaluates dense spatial displacements across the grid, synthesizing images within narrower color gamuts directly at generation time without post-processing.
Steers the scene's color distribution to match either a discrete color palette or an exemplar reference image. Extracts principal colors via CIELAB k-means clustering with CIEDE2000 distance constraints, and uses the most chromatic color as a prompt proxy. At the gate step, semantic regions are identified and steered toward target palette colors via the latent color basis, faithfully reproducing the reference palette while generating the prompt content.
Explore the three generation-time modes.
@article{santamaria2025coloralignment,
title={On Color Alignment in VAE Latent Spaces and Its Applications},
author={Santamaria, Julian D. and Wang, Kai and Malo, Jes{\'u}s and Vazquez-Corral, Javier and Gomez-Villa, Alexandra},
journal={arXiv preprint arXiv:XXXX.XXXXX},
year={2025}
}