It's All About Your Sketch: Democratising Sketch Control in Diffusion Models

Subhadeep Koley, Ayan Kumar Bhunia, Deeptanshu Sekhri, Aneeshan Sain, Pinaki Nath Chowdhury, Tao Xiang, Yi-Zhe Song

Abstract

While sketch-to-image generation offers an intuitive interface for creative expression, existing controllable diffusion models often fail when presented with amateur, freehand sketches. These models, typically trained on precise edge maps, suffer from "spatial-conditioning deformities" where the final output inherits the geometric flaws of the input. This paper introduces a novel abstraction-aware framework designed to democratise sketch control. By replacing rigid spatial mapping with a semantic-aware Sketch Adapter and incorporating fine-grained discriminative learning, the proposed method allows for high-quality, photo-realistic generation from rough sketches without requiring text prompts at inference time.

Introduction

Controllable diffusion models like ControlNet and T2I-Adapter have significantly advanced the state of image synthesis. However, their promise of sketch-based control is often deceptive for the average user. These models are generally trained on "pixel-perfect" edgemaps—clean, artistically accurate outlines derived from existing photographs. When a non-artist provides a rough, "half-decent" freehand sketch, these models attempt to force the output pixels to align perfectly with the input lines. This rigid adherence results in distorted anatomy and lack of photorealism, as any wobbliness in the user's sketch is "baked into" the final image.

This work addresses this limitation by moving away from strict spatial conditioning toward an "abstraction-aware" semantic approach. The goal is to enable a "what you sketch is what you get" experience that understands the user's intent rather than just their literal (and often flawed) geometry.

Methodology

The proposed framework introduces several key components to bridge the gap between abstract sketches and realistic images:

1. The Sketch Adapter

Instead of feeding the sketch directly into the UNet as a spatial map, the model utilizes a CLIP-based encoder and a specialized adapter. This component transforms the sketch into a sequence of feature vectors that act as an "equivalent textual embedding." By processing the sketch via cross-attention mechanisms rather than strict pixel-wise alignment, the model is forced to "understand" the semantic content of the sketch, preventing the "edge-bleeding" artifacts common in previous methods.

2. Fine-Grained Discriminative Learning

To ensure that the generated image maintains the specific details of the sketch (e.g., the specific pose of a bird or the shape of a shoe), the authors leverage a pre-trained Fine-Grained Sketch-Based Image Retrieval (FG-SBIR) model. This provides a discriminative loss during training that enforces high fidelity between the sketch's unique characteristics and the generated output.

3. Super-concept Preservation

During the training phase, the authors utilize synthetically generated captions (via BLIP) to guide the Sketch Adapter. This ensures the model maintains the "super-concept" (the general category, such as "a cat") while the sketch provides the fine-grained structural details. This dual-guidance prevents the model from losing the core identity of the object during the abstraction process.

4. Abstraction-aware Importance Sampling

Recognizing that sketches vary in their level of detail, the framework introduces a smart time-step ($t$) sampling strategy. Using a MagFace-based classifier to determine an "abstraction score," the model adjusts its denoising process. For highly abstract sketches, sampling is skewed toward larger $t$ values, where high-level semantic structures are formed, allowing the model more creative liberty to correct shaky lines. For detailed sketches, sampling is more uniform to preserve the provided detail.

Experimental Results

The model was primarily trained and evaluated on the Sketchy dataset (12,500 image-sketch pairs across 125 categories). To test generalization, it was also evaluated against TU-Berlin, QuickDraw, and synthetic edgemaps.

Quantitative Performance

The proposed method significantly outperformed state-of-the-art (SOTA) models across multiple metrics:

  • Fidelity: The model achieved a 23.45% improvement in Fine-Grained Metric (FGM) over ControlNet, demonstrating superior alignment with sketch details.
  • Image Quality: The model reached a lower (better) FID-C score of 16.20, compared to ControlNet’s 21.22.
  • Human Preference: In a user study, the method received a Mean Opinion Score (MOS) of 4.52/5.0, whereas ControlNet and T2I-Adapter scored 3.68 and 3.11, respectively.

Qualitative Advantages

A key insight of the study is the "bottleneck benefit." By compressing the sketch into a semantic representation, the model avoids the harsh, unrealistic lines that often ruin the photorealism of sketch-to-image outputs. Furthermore, the framework allows for prompt-free inference, meaning users can generate images using only their sketch, without needing to provide descriptive text.

Limitations and Future Work

Despite its success, the model faces challenges with categorical ambiguity. When two objects share similar abstract shapes (e.g., a violin vs. a guitar), the model may occasionally misidentify the class. Future research will explore "composed-conditioning," allowing users to provide a simple class label alongside the sketch to resolve these ambiguities. Additionally, the authors plan to extend the framework from single-object generation to more complex, multi-object scenes.

Conclusion

By shifting the focus from pixel-level alignment to semantic understanding, this framework effectively democratises sketch-based image generation. It empowers amateur users to produce high-quality, faithful images from rough sketches, overcoming the rigid constraints of previous spatial-conditioning models.

Summary updated

BibTeX
@inproceedings{koley2024it,
  author = {Subhadeep Koley and Ayan Kumar Bhunia and Deeptanshu Sekhri and Aneeshan Sain and Pinaki Nath Chowdhury and Tao Xiang and Yi-Zhe Song},
  title = {{It's All About Your Sketch: Democratising Sketch Control in Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure