This is the repository for the paper SVGBuilder: Component-Based Colored SVG Generation with Text-Guided Autoregressive Transformers, accepted by AAAI 2025.
SVGBuilder is a component-based autoregressive framework for efficient text-to-SVG generation, leveraging modular graphic construction to produce high-quality colored vector graphics with dramatically reduced computational cost and up to 604× faster generation than traditional optimization-based methods.
We use uv for extremely fast Python package management.
1. Install uv (if you haven't already):
Please refer to the official uv documentation for installation instructions.
2. Clone the repository:
git clone https://github.com/amcghm/SVGBuilder.git
cd SVGBuilder3. Install dependencies:
uv sync4. Download Pre-trained Models:
Download hpc.pt from align_sd and place it in the ./hpc directory:
# Place the downloaded hpc.pt here:
./hpc/hpc.ptOur model is trained and evaluated on the ColorSVG-100K dataset.
You can access the ColorSVG-100K GitHub repository and download it from GitHub Releases.
After downloading, please unzip the dataset and place it in the ./data directory. The final directory structure should look like this:
data/ColorSVG-100K/You can modify the training and dataset configurations (such as model paths, batch size, learning rate, etc.) by adjusting the config dictionary at the beginning of the train.py file.
Once everything is installed and configured, you can start the data processing and training pipeline. Note that a GPU is required for these steps.
1. Preprocess the data:
uv run preprocess.py2. Build similarity triplets:
uv run build_sim_triplets.py3. Train the model:
uv run train.pyIf you find our work helpful in your research, please cite our paper:
@inproceedings{chen2025svgbuilder,
title = {SVGBuilder: Component-Based Colored SVG Generation with Text-Guided Autoregressive Transformers},
author = {Chen, Zehao and Pan, Rong},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
volume = {39},
number = {3},
pages = {2358--2366},
year = {2025}
}This project is licensed under the MIT License.
