Stroke2Sketch: Harnessing Stroke Attributes for Training-Free Sketch Generation
Rui Yang, Huining Li, Yiyi Long, Xiaojun Wu, Shengfeng He
TL;DR
Stroke2Sketch introduces a training-free framework that transfers reference stroke attributes to a content image while preserving structure, achieved through cross-image stroke attention within pretrained diffusion models. It deploys three novel components—Directive Attention Module for foreground-focused stylization, Semantic Preservation Module for contour- and text-guided semantic alignment, and Stroke Details Propagation Enhancement for refined stroke details—along with adaptive contrast and CFG-based denoising. The method demonstrates state-of-the-art performance on Stroke2Sketch-dataset and FS2K, with strong user preferences and robust ablations validating the contributions. By leveraging pretrained priors and principled feature interactions, Stroke2Sketch enables high-fidelity, reference-aligned sketches without style-specific training, offering practical utility for artistic and design workflows.
Abstract
Generating sketches guided by reference styles requires precise transfer of stroke attributes, such as line thickness, deformation, and texture sparsity, while preserving semantic structure and content fidelity. To this end, we propose Stroke2Sketch, a novel training-free framework that introduces cross-image stroke attention, a mechanism embedded within self-attention layers to establish fine-grained semantic correspondences and enable accurate stroke attribute transfer. This allows our method to adaptively integrate reference stroke characteristics into content images while maintaining structural integrity. Additionally, we develop adaptive contrast enhancement and semantic-focused attention to reinforce content preservation and foreground emphasis. Stroke2Sketch effectively synthesizes stylistically faithful sketches that closely resemble handcrafted results, outperforming existing methods in expressive stroke control and semantic coherence. Codes are available at https://github.com/rane7/Stroke2Sketch.
