Abstract
This paper introduces a novel approach to sketch colourisation, inspired by the universal childhood activity of colouring and its professional applications in design and story-boarding. Striking a balance between precision and convenience, our method utilises region masks and colour palettes to allow intuitive user control, steering clear of the meticulousness of manual colour assignments or the limitations of textual prompts. By strategically combining ControlNet and staged generation, incorporating Stable Diffusion v1.5, and leveraging BLIP-2 text prompts, our methodology facilitates faithful image generation and user-directed colourisation. Addressing challenges of local and global consistency, we employ inventive solutions such as an inversion scheme, guided sampling, and a self-attention mechanism with a scaling factor. The resulting tool is not only fast and training-free but also compatible with consumer-grade Nvidia RTX 4090 Super GPUs, making it a valuable asset for both creative professionals and enthusiasts in various fields.
Introduction: The Control Gap in AI Colourisation
While generative AI has made significant strides in image synthesis, professional artists often find existing tools lacking the surgical precision required for production workflows. A primary challenge lies in the ambiguity of text-to-image prompts. For instance, requesting "a car with a blue rear and its front painted red" often results in "colour bleeding" or semantic errors where the model misplaces the colours relative to the sketch's geometry.
Existing solutions typically force a trade-off: manual reference-based methods offer high precision but are labour-intensive, while text-guided diffusion is fast but imprecise. SketchDeco bridges this gap by reformulating colourisation as a latent-space composition problem, allowing artists to specify where and how colour is applied without the need for model fine-tuning.
Methodology
SketchDeco employs a training-free, two-stage "divide-and-conquer" strategy to ensure both global harmony and local precision.
1. Global Sketch Colourisation
The first stage generates a globally consistent base image. To bridge the gap between user intent and model understanding, the system uses BLIP-2 to predict the sketch's semantic class. Because diffusion models process text more effectively than raw hex codes, a K-D Tree maps user-selected colours to the nearest CSS3 colour names. A pretrained Scribble ControlNet ensures the output strictly adheres to the input sketch's structural lines.
2. Local Sketch Colourisation via Latent Composition
The core innovation of SketchDeco lies in its second stage, which handles local edits through latent-space manipulation rather than simple re-generation.
After "painting" the user's specific colour choices into the designated masks in pixel space, the system uses ODE Inversion (via DPM-Solver++) to map the edited image back into the diffusion model's latent space. To maintain structural fidelity and colour accuracy during the final denoising, a custom Self-Attention Injection mechanism is used. A scaling factor ($\tau$) allows for a balance between the natural harmony of the generated image and strict adherence to the user's original palette.
Experimental Evaluation
The framework was evaluated across diverse domains, including animal textures (AFHQ), architectural scenes (Places365), anime line art (Danbooru2023), and multi-object natural scenes (PascalVOC2012).
Key Results
- Fidelity and Realism: SketchDeco consistently outperformed state-of-the-art methods like DiffBlender and T2I-Adapter, achieving lower Fréchet Inception Distance (FID) and Learned Perceptual Image Patch Similarity (LPIPS) scores.
- Colour Accuracy: Using Dynamic Closest Colour Warping (DCCW), the authors demonstrated that SketchDeco is significantly more effective at adhering to requested palettes than traditional text-based methods.
- Efficiency: The entire process requires only 15–20 inference steps, making it suitable for interactive design on consumer-grade hardware like the RTX 4090.
Conclusion and Future Work
SketchDeco demonstrates that high-precision control can be achieved by leveraging the rich generative priors of existing models without expensive retraining. By mapping mathematical colour coordinates to semantic concepts and separating global generation from local composition, it provides a robust tool for artists.
Future work will focus on improving colour fidelity in extremely small, intricate regions and expanding the semantic colour database to include more nuanced artistic terminology, further reducing the ambiguity inherent in language-guided generation.
Summary updated