StrokeNUWA: Tokenizing Strokes for Vector Graphic Synthesis
Zecheng Tang, Chenfei Wu, Zekai Zhang, Mingheng Ni, Shengming Yin, Yu Liu, Zhengyuan Yang, Lijuan Wang, Zicheng Liu, Juntao Li, Nan Duan
TL;DR
StrokeNUWA introduces stroke tokens as a semantic, compressed representation for vector graphics to leverage LLMs without visual modules. It combines a Vector Quantized-Stroke encoder, an Encoder-Decoder LLM, and an SVG Fixer to produce SVGs from text prompts swiftly, achieving up to 94x faster generation and a 6.9% compression ratio. Across reconstruction and text-guided SVG generation tasks, StrokeNUWA outperforms optimization-based methods and LLM baselines in FID, CLIP, and perceptual quality while delivering semantically richer content. The work highlights the potential of stroke-token representations to enhance semantic fidelity and efficiency in vector-graphic synthesis, with prospects for broader SVG understanding and cross-domain extensions.
Abstract
To leverage LLMs for visual synthesis, traditional methods convert raster image information into discrete grid tokens through specialized visual modules, while disrupting the model's ability to capture the true semantic representation of visual scenes. This paper posits that an alternative representation of images, vector graphics, can effectively surmount this limitation by enabling a more natural and semantically coherent segmentation of the image information. Thus, we introduce StrokeNUWA, a pioneering work exploring a better visual representation ''stroke tokens'' on vector graphics, which is inherently visual semantics rich, naturally compatible with LLMs, and highly compressed. Equipped with stroke tokens, StrokeNUWA can significantly surpass traditional LLM-based and optimization-based methods across various metrics in the vector graphic generation task. Besides, StrokeNUWA achieves up to a 94x speedup in inference over the speed of prior methods with an exceptional SVG code compression ratio of 6.9%.
