Abstract
Image colorization remains a challenging task in computer vision due to its inherently ill-posed nature, where a single grayscale input can correspond to numerous valid color interpretations. Traditional methods often suffer from "regression to the mean," resulting in desaturated or brownish outputs. This paper introduces a novel framework leveraging Latent Diffusion Models (LDMs) to produce vibrant, semantically accurate colorizations. By operating within a compressed latent space and utilizing granular text prompts, the proposed method provides high-quality results and unprecedented user control. Our approach includes a unique CLIP-based ranking system and demonstrates state-of-the-art performance on benchmarks including ImageNet and COCO-Stuff, as well as practical utility in historical photo restoration.
Introduction
Colorizing a grayscale image is a classic under-determined problem. Because a single object—such as a car or a piece of clothing—could realistically be any number of colors, standard neural networks trained on mean-squared error losses often produce "safe," desaturated results. While Generative Adversarial Networks (GANs) have attempted to solve this by producing more vivid imagery, they are frequently plagued by training instability and mode collapse.
This research addresses these challenges by adapting diffusion models to the colorization task. By framing colorization as a generative process guided by text, we can move beyond simple statistical averages to produce diverse, vibrant, and contextually appropriate color schemes that users can steer through natural language.
Methodology
Latent Space Operations
To ensure computational efficiency, the framework operates within the latent space of a pretrained Variational Autoencoder (VAE) rather than directly on high-resolution pixels. This allows the model to focus on learning high-level semantic color distributions while the VAE handles the reconstruction of fine spatial details.
Color Residual Prediction and Cold Diffusion
The core of the architecture is a U-Net trained to predict a "color-latent" residual. This residual represents the difference between the latent representation of a grayscale image and its original colored version. The model follows the Cold Diffusion paradigm, where color information is iteratively added to the grayscale starting point over several sampling steps.
Text Guidance and Classifier-Free Guidance (CFG)
User control is achieved through text embeddings. A significant finding in this work is the efficacy of negative prompts. By explicitly instructing the model to avoid "grainy black-and-white" or "desaturated" outputs, the system effectively pushes the generation away from the "brownish" results typical of older methods.
Luma Replacement
To maintain the structural integrity of the original grayscale input, the authors implement a "Luma Replacement" step. After the VAE decoder generates the final color image, the "luma" (brightness) channel is replaced with the original grayscale input's luma. This ensures that the sharpness and fine details of the original photograph are perfectly preserved, bypassing any potential blurring introduced by the VAE.
Key Insights
Linearity of Color in Latent Space
One of the most significant discoveries in this research is the linear relationship between the color residual vector in the VAE latent space and the resulting image saturation. By scaling this vector, users can adjust a "saturation slider" to fine-tune the intensity of the colors without needing to re-run the entire diffusion process.
Automatic Ranking with CLIP
Because the ideal level of colorfulness is often subjective, the authors developed an automatic ranking system. By generating multiple versions of an image at different saturation scales, a CLIP-based model evaluates and selects the version that best balances natural appearance with visual appeal.
Restoration Pipeline Integration
The study demonstrates that colorization is most effective when treated as the final stage of a restoration pipeline. When applied to historical photos (e.g., the KeystoneDepth dataset), performing scratch removal and noise reduction prior to colorization yields significantly better results, as the input more closely matches the clean data used during the model's training.
Experimental Results
Quantitative Performance
The model was evaluated on standard benchmarks, including ImageNet ctest10k and COCO-Stuff. The proposed method achieved a Fréchet Inception Distance (FID) of 3.52 on ImageNet, outperforming leading competitors such as BigColor (3.58) and DeOldify (5.78). This lower FID score indicates a higher degree of realism and closer alignment with the distribution of real-world colored images.
User Study
In a large-scale user study involving 402 participants, the proposed framework was consistently rated as the most realistic. Participants preferred the diffusion-based outputs over those from GAN-based or regression-based models by a significant margin, citing better semantic consistency and more natural color transitions.
Semantic Control
Qualitative tests confirm the model's responsiveness to specific text prompts. For instance, users can precisely change the color of specific objects (e.g., "a woman in a blue dress" vs. "a woman in a pink dress") while the background and lighting remain consistent, demonstrating robust semantic understanding.
Limitations and Future Work
While the model excels at general colorization, it faces difficulties with complex spatial layouts. Prompts requiring specific spatial arrangements (e.g., "a red car on the left and a blue car on the right") can sometimes lead to color bleeding or incorrect assignments. This is a limitation inherent to the underlying Stable Diffusion architecture. Future research may integrate spatial control mechanisms like ControlNet to provide more granular, "color-by-numbers" precision. Additionally, exploring diffusion directly in pixel space may help eliminate subtle artifacts occasionally introduced by the latent-to-pixel decoding process.
Summary updated